diff options
| author | Stefan Kangas | 2024-12-19 04:50:32 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2024-12-19 04:50:32 +0100 |
| commit | ba0c49ed662e1038cfdb34558c775cbcc4f663a7 (patch) | |
| tree | 1044c3516c9aeb82167af88a1850807ffaf20198 | |
| parent | e3d1bab98d3d50375a97808cd1e422231f411c0a (diff) | |
| download | emacs-ba0c49ed662e1038cfdb34558c775cbcc4f663a7.tar.gz emacs-ba0c49ed662e1038cfdb34558c775cbcc4f663a7.zip | |
Prefer defvar-keymap in goto-addr.el
* lisp/net/goto-addr.el (goto-address-highlight-keymap): Convert to
defvar-keymap.
| -rw-r--r-- | lisp/net/goto-addr.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index ac36bfe05ce..298e11807c8 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el | |||
| @@ -117,12 +117,10 @@ will have no effect.") | |||
| 117 | thing-at-point-url-path-regexp) | 117 | thing-at-point-url-path-regexp) |
| 118 | "A regular expression probably matching a URL.") | 118 | "A regular expression probably matching a URL.") |
| 119 | 119 | ||
| 120 | (defvar goto-address-highlight-keymap | 120 | (defvar-keymap goto-address-highlight-keymap |
| 121 | (let ((m (make-sparse-keymap))) | 121 | :doc "Keymap to hold goto-addr's mouse key defs under highlighted URLs." |
| 122 | (define-key m (kbd "<mouse-2>") #'goto-address-at-point) | 122 | "<mouse-2>" #'goto-address-at-point |
| 123 | (define-key m (kbd "C-c RET") #'goto-address-at-point) | 123 | "C-c RET" #'goto-address-at-point) |
| 124 | m) | ||
| 125 | "Keymap to hold goto-addr's mouse key defs under highlighted URLs.") | ||
| 126 | 124 | ||
| 127 | (defun goto-address-context-menu (menu click) | 125 | (defun goto-address-context-menu (menu click) |
| 128 | "Populate MENU with `goto-address' commands at CLICK." | 126 | "Populate MENU with `goto-address' commands at CLICK." |