branch: externals/denote commit 2b06213c3e209e034960c5754d384955de48d18a Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Rename the denote-link-mouse-map and make minor tweaks to it 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/denote.el b/denote.el index 8d2f809c0c..0fc8172986 100644 --- a/denote.el +++ b/denote.el @@ -4243,13 +4243,13 @@ To be assigned to `markdown-follow-link-functions'." '(add-hook 'markdown-follow-link-functions #'denote-link-markdown-follow)) ;;;;; Link fontification -(defvar denote-link-keymap +(defvar denote-link-mouse-map (let ((map (make-sparse-keymap))) (define-key map [mouse-2] #'denote-link-open-at-mouse) (define-key map [mouse-3] #'denote-link-open-at-mouse) - (define-key map [follow-link] #'mouse-face) + (define-key map [follow-link] 'mouse-face) map) - "Keymap used in fontified denote links") + "Keymap for mouse actions over fontified Denote links.") (defun denote-link-open-at-mouse (ev) "Open denote link after mouse click." @@ -4280,7 +4280,7 @@ Implementation based on `org-activate-links'" (memq 'font-lock-comment-face face) (eq 'font-lock-comment-face face))) (let* ((properties `(mouse-face highlight - keymap ,denote-link-keymap + keymap ,denote-link-mouse-map denote-link-id ,id help-echo ,(concat "denote:" id) htmlize-link (:uri ,link)