[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-auto-tangle 5a991c0b16 2/4: Simplify (org-auto-tangle-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-auto-tangle 5a991c0b16 2/4: Simplify (org-auto-tangle-tangle-if-needed): |
Date: |
Thu, 14 Jul 2022 23:58:44 -0400 (EDT) |
branch: elpa/org-auto-tangle
commit 5a991c0b1681cd0fb3d8875406bdc40a88a8fc34
Author: yilkalargaw <yilkalargawworkneh@gmail.com>
Commit: yilkalargaw <yilkalargawworkneh@gmail.com>
Simplify (org-auto-tangle-tangle-if-needed):
Simplify (org-auto-tangle-tangle-if-needed): and make it work in
Org-mode derivatives.
Patch sent by Stefan Monnier <monnier@iro.umontreal.ca> on 2022-07-13
---
org-auto-tangle.el | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/org-auto-tangle.el b/org-auto-tangle.el
index aeb15a9ba1..e18e424b1b 100644
--- a/org-auto-tangle.el
+++ b/org-auto-tangle.el
@@ -104,11 +104,10 @@ Tangle will happen depending on the value of
`#+auto_tangle' keyword in the current buffer. If present,
`#+auto_tangle' always overrides `org-auto-tangle-default'."
(let ((auto-tangle-kw (org-auto-tangle-find-value (current-buffer))))
- (when (and (eq major-mode 'org-mode)
- (or (and auto-tangle-kw
- (not (string= auto-tangle-kw "nil")))
- (and (not auto-tangle-kw)
- org-auto-tangle-default)))
+ (when (and (derived-mode-p 'org-mode)
+ (if auto-tangle-kw
+ (not (string= auto-tangle-kw "nil"))
+ org-auto-tangle-default))
(org-auto-tangle-async (buffer-file-name)))))
;;;###autoload