Skip to content

Commit

Permalink
used a more consice major mode check
Browse files Browse the repository at this point in the history
based on a comment by @riscy the 
(string= (buffer-local-value 'major-mode (current-buffer)) "org-mode")
line is replaced by 
(eq major-mode 'org-mode)
  • Loading branch information
yilkalargaw authored Feb 7, 2021
1 parent 54dc42d commit 820cdd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion org-auto-tangle.el
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

(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 (string= (buffer-local-value 'major-mode (current-buffer)) "org-mode")
(when (and (eq major-mode 'org-mode)
(org-auto-tangle-find-value (current-buffer))
(not (string= (org-auto-tangle-find-value(current-buffer)) "nil")))
(org-auto-tangle-async (buffer-file-name))))
Expand Down

0 comments on commit 820cdd1

Please sign in to comment.