From 7529ddef22adc3c0aed1cc0bbe191ad992e37019 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 10 May 2022 23:20:52 +0200 Subject: [PATCH] * lisp/net/browse-url.el (browse-url-button-map): Prefer defvar-keymap. --- lisp/net/browse-url.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index c563a27ac85..362dcf25b55 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1633,13 +1633,11 @@ from `browse-url-elinks-wrapper'." ;;; Adding buttons to a buffer to call `browse-url' when you hit them. -(defvar browse-url-button-map - (let ((map (make-sparse-keymap))) - (define-key map "\r" #'browse-url-button-open) - (define-key map [mouse-2] #'browse-url-button-open) - (define-key map "w" #'browse-url-button-copy) - map) - "The keymap used for `browse-url' buttons.") +(defvar-keymap browse-url-button-map + :doc "The keymap used for `browse-url' buttons." + "RET" #'browse-url-button-open + "" #'browse-url-button-open + "w" #'browse-url-button-copy) (defface browse-url-button '((t :inherit link)) -- 2.39.2