diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2022-10-16 13:53:37 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-10-16 13:53:37 +0200 |
commit | 494ccec94ede12a56c9fb2393a3c75260b8638a7 (patch) | |
tree | c2f8e67b0b9b84e65b37139c72780b1a223bd375 /lisp/ansi-osc.el | |
parent | d4244ec8cc42672fbec5fdbbd8eb9f257d2f974c (diff) | |
download | emacs-494ccec94ede12a56c9fb2393a3c75260b8638a7.tar.gz emacs-494ccec94ede12a56c9fb2393a3c75260b8638a7.tar.bz2 emacs-494ccec94ede12a56c9fb2393a3c75260b8638a7.zip |
Prefer defvar-keymap in ansi-osc.el
* lisp/ansi-osc.el (ansi-osc-hyperlink-map): Prefer defvar-keymap.
Diffstat (limited to 'lisp/ansi-osc.el')
-rw-r--r-- | lisp/ansi-osc.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/ansi-osc.el b/lisp/ansi-osc.el index 34154998cdf..499c9dce73a 100644 --- a/lisp/ansi-osc.el +++ b/lisp/ansi-osc.el @@ -125,13 +125,11 @@ and `shell-dirtrack-mode'." ;; Hyperlink handling (OSC 8) -(defvar ansi-osc-hyperlink-map - (let ((map (make-sparse-keymap))) - (define-key map "\C-c\r" 'browse-url-button-open) - (define-key map [mouse-2] 'browse-url-button-open) - (define-key map [follow-link] 'mouse-face) - map) - "Keymap used by OSC 8 hyperlink buttons.") +(defvar-keymap ansi-osc-hyperlink-map + :doc "Keymap used by OSC 8 hyperlink buttons." + "C-c RET" #'browse-url-button-open + "<mouse-2>" #'browse-url-button-open + "<follow-link>" 'mouse-face) (define-button-type 'ansi-osc-hyperlink 'keymap ansi-osc-hyperlink-map |