From: Stefan Kangas Date: Thu, 7 Jul 2022 15:25:39 +0000 (+0200) Subject: Prefer keymap inheritance in shr-image-map X-Git-Tag: emacs-29.0.90~1447^2~1108 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cbfd959e26da13ae872ee11a1c8365abd6906d96;p=emacs.git Prefer keymap inheritance in shr-image-map * lisp/net/shr.el (shr-image-map): Replace copy-keymap with inheritance. --- diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 63f313bbf44..c4f0d3b9404 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -290,11 +290,10 @@ and other things: "O" #'shr-save-contents "RET" #'shr-browse-url) -(defvar shr-image-map - (let ((map (copy-keymap shr-map))) - (when (boundp 'image-map) - (set-keymap-parent map image-map)) - map)) +(defvar-keymap shr-image-map + :parent (if (boundp 'image-map) + (make-composed-keymap shr-map image-map) + shr-map)) ;; Public functions and commands. (declare-function libxml-parse-html-region "xml.c"