From 1b1b44efca48dd4bb086f92435510197670f6956 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 19 Dec 2024 04:50:32 +0100 Subject: [PATCH] Prefer defvar-keymap in goto-addr.el * lisp/net/goto-addr.el (goto-address-highlight-keymap): Convert to defvar-keymap. (cherry picked from commit ba0c49ed662e1038cfdb34558c775cbcc4f663a7) --- lisp/net/goto-addr.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 7c72c67f187..5e4e9519275 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -117,12 +117,10 @@ will have no effect.") thing-at-point-url-path-regexp) "A regular expression probably matching a URL.") -(defvar goto-address-highlight-keymap - (let ((m (make-sparse-keymap))) - (define-key m (kbd "") #'goto-address-at-point) - (define-key m (kbd "C-c RET") #'goto-address-at-point) - m) - "Keymap to hold goto-addr's mouse key defs under highlighted URLs.") +(defvar-keymap goto-address-highlight-keymap + :doc "Keymap to hold goto-addr's mouse key defs under highlighted URLs." + "" #'goto-address-at-point + "C-c RET" #'goto-address-at-point) (defun goto-address-context-menu (menu click) "Populate MENU with `goto-address' commands at CLICK." -- 2.39.5