branch: externals/denote commit 5dcbf34feac371071687c0c99179cce122cb0f68 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Make denote-fontify-links-mode not do anything in Org mode We do not need it because Org fontifies 'denote:' links natively. This builds on top of the new fontification feature provided by Abdul-Lateef Haji-Ali in pull request 344 (commit 4d12452): <https://github.com/protesilaos/denote/pull/344>. --- denote.el | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/denote.el b/denote.el index ac9dc67b90..129f651457 100644 --- a/denote.el +++ b/denote.el @@ -4290,20 +4290,21 @@ To be used as a `thing-at' provider." :init-value nil :global nil :group 'denote - (require 'thingatpt) - (if denote-fontify-links-mode - (progn - (font-lock-add-keywords nil '(denote-fontify-links)) - (make-local-variable 'thing-at-point-provider-alist) - (add-to-list 'thing-at-point-provider-alist - '(url . denote--get-link-file-path-at-point))) - (font-lock-remove-keywords nil '(denote-fontify-links)) - (set 'thing-at-point-provider-alist - (cl-remove - '(url . denote--get-link-file-path-at-point) - (symbol-value 'thing-at-point-provider-alist) - :test 'equal))) - (font-lock-update)) + (unless (derived-mode-p 'org-mode) + (require 'thingatpt) + (if denote-fontify-links-mode + (progn + (font-lock-add-keywords nil '(denote-fontify-links)) + (make-local-variable 'thing-at-point-provider-alist) + (add-to-list 'thing-at-point-provider-alist + '(url . denote--get-link-file-path-at-point))) + (font-lock-remove-keywords nil '(denote-fontify-links)) + (set 'thing-at-point-provider-alist + (cl-remove + '(url . denote--get-link-file-path-at-point) + (symbol-value 'thing-at-point-provider-alist) + :test 'equal))) + (font-lock-update))) ;;;;; Backlinks' buffer