branch: elpa/git-commit
commit ce7d1cf417bdaee776c2729cd7d5025cf93dcee5
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    git-commit-turn-on-orglink: Don't do it in org-mode
    
    Re https://github.com/tarsius/orglink/issues/12.
---
 lisp/git-commit.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/git-commit.el b/lisp/git-commit.el
index f6e210b..fb689d9 100644
--- a/lisp/git-commit.el
+++ b/lisp/git-commit.el
@@ -622,8 +622,11 @@ to `git-commit-fill-column'."
   (turn-on-auto-fill))
 
 (defun git-commit-turn-on-orglink ()
-  "Turn on Orglink mode if it is available."
-  (when (and (boundp 'orglink-match-anywhere)
+  "Turn on Orglink mode if it is available.
+If `git-commit-major-mode' is `org-mode', then silently forgo
+turning on `orglink-mode'."
+  (when (and (not (derived-mode 'org-mode))
+             (boundp 'orglink-match-anywhere)
              (fboundp 'orglink-mode))
     (setq-local orglink-match-anywhere t)
     (orglink-mode 1)))

Reply via email to