[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-auto-tangle 2e4a664210 19/56: moved the anonymous func
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-auto-tangle 2e4a664210 19/56: moved the anonymous function inside the hooks to a named function |
Date: |
Mon, 6 Jun 2022 11:58:52 -0400 (EDT) |
branch: elpa/org-auto-tangle
commit 2e4a6642109f04e6097623a00ed3408abfb7d1de
Author: lispy-dobby <yilkalargawworkneh@gmail.com>
Commit: lispy-dobby <yilkalargawworkneh@gmail.com>
moved the anonymous function inside the hooks to a named function
---
org-auto-tangle.el | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/org-auto-tangle.el b/org-auto-tangle.el
index e31eb90e00..d957f1854c 100644
--- a/org-auto-tangle.el
+++ b/org-auto-tangle.el
@@ -79,6 +79,13 @@
(message (concat ,message-string
(format "%s seconds" tangle-time)))))))
+(defun org-auto-tangle-tangle-if-tag-exists ()
+ "Check if the #+auto_tangle option exists and call org-auto-tangle-async if
it exists."
+ (when (and (org-auto-tangle-find-value (current-buffer))
+ (not (string= (org-auto-tangle-find-value(current-buffer)) "nil")))
+ (org-auto-tangle-async (buffer-file-name)))
+ )
+
(define-minor-mode org-auto-tangle-mode
"Automatically tangle org-mode files with the option #+auto_tangle: t."
:lighter " org-a-t"
@@ -86,10 +93,8 @@
(when org-auto-tangle-mode
(add-hook 'org-mode-hook
(add-hook 'after-save-hook
- (lambda () (when (and (org-auto-tangle-find-value
(current-buffer))
- (not (string=
(org-auto-tangle-find-value(current-buffer)) "nil")))
- (org-auto-tangle-async
(buffer-file-name)))))
- nil 'local)))
+ (org-auto-tangle-tangle-if-tag-exists)
+ nil 'local))))
(provide 'org-auto-tangle)
- [nongnu] elpa/org-auto-tangle 0add68b91c 17/56: corrected the doc string issue raised by checkdoc, (continued)
- [nongnu] elpa/org-auto-tangle 0add68b91c 17/56: corrected the doc string issue raised by checkdoc, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle b23eafd743 05/56: corrected the variable name in conditialal when, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 0e67925941 06/56: removed unecessary line space in the code block, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle ac0458b251 10/56: Add package dependency to Package-Requires header, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 34e63c2754 23/56: matched license in org-auto-tangle.el match that of License.org, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 5ffbe41243 39/56: Add org-auto-tangle-default variable, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle ec4341f844 47/56: moved (require 'org) to global instead of inline, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 5da721fff9 40/56: Update readme to correct grammatical issues., ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle fbdd38d11e 55/56: Added Safe-list usage to readme, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle d3036a040a 12/56: moved the method definations to top level to remove error warnings, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 2e4a664210 19/56: moved the anonymous function inside the hooks to a named function,
ELPA Syncer <=
- [nongnu] elpa/org-auto-tangle eed3601f4b 25/56: added syntax highlighting and some spelling corrections, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle ade8d90ecf 34/56: changed quotes for functions with a sharp quote, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle dc7eb11e6a 45/56: Merge pull request #7 from zzamboni/master, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 5d9f2734c9 54/56: Update License.org, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle cedd4dc41f 46/56: Update org-auto-tangle.el, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 6c0786d863 14/56: modified the readme to reflect the changes, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 70e5e3d131 13/56: move the whole thing into a minor mode, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 2e97156230 32/56: Merge pull request #2 from kamoii/patch-1, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle be9007a23a 43/56: corrected the arguments to org-auto-tangle-find-value function call, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle cebc4bbf73 44/56: Improve auto_tangle regex, ELPA Syncer, 2022/06/06