]> git.eshelyaron.com Git - emacs.git/commitdiff
Make remapped keys work in set-transient-map
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 23 May 2022 11:08:17 +0000 (13:08 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 23 May 2022 11:10:04 +0000 (13:10 +0200)
* lisp/subr.el (set-transient-map): Make remapped keys work in
transient maps (bug#40096).

lisp/subr.el

index 6538d790507ae32a92097887bef249ee751c227e..0fc1156d40ccea8adfd8bf533d5a2b2fcb115f72 100644 (file)
@@ -6043,6 +6043,10 @@ to deactivate this transient map, regardless of KEEP-PRED."
                         t)
                        ((eq t keep-pred)
                         (let ((mc (lookup-key map (this-command-keys-vector))))
+                          ;; We may have a remapped command, so chase
+                          ;; down that.
+                          (when (and mc (symbolp mc))
+                            (setq mc (or (command-remapping mc nil map) mc)))
                           ;; If the key is unbound `this-command` is
                           ;; nil and so is `mc`.
                           (and mc (eq this-command mc))))