Skip to content

Commit

Permalink
Simplify (org-auto-tangle-tangle-if-needed):
Browse files Browse the repository at this point in the history
Simplify (org-auto-tangle-tangle-if-needed):  and make it work in
    Org-mode derivatives.

Patch sent by Stefan Monnier  <[email protected]> on 2022-07-13
  • Loading branch information
yilkalargaw committed Jul 15, 2022
1 parent c32e28c commit 5a991c0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions org-auto-tangle.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a991c0

Please sign in to comment.