From: Stefan Kangas Date: Tue, 10 May 2022 21:20:52 +0000 (+0200) Subject: * lisp/net/browse-url.el (browse-url-button-map): Prefer defvar-keymap. X-Git-Tag: emacs-29.0.90~1910^2~797 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7529ddef22adc3c0aed1cc0bbe191ad992e37019;p=emacs.git * lisp/net/browse-url.el (browse-url-button-map): Prefer defvar-keymap. --- 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))