* Re: master e5d76634a2: Make remapped keys work in set-transient-map
[not found] ` <20220523111011.525EAC051FF@vcs2.savannah.gnu.org>
@ 2022-05-23 12:41 ` Stefan Monnier
2022-05-24 12:56 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2022-05-23 12:41 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
Lars Ingebrigtsen [2022-05-23 07:10:11] wrote:
> index 6538d79050..0fc1156d40 100644
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> @@ -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))))
The remapping could also come from [remap <mc>] bindings in some other
active keymap so maybe we should skip passing `map` to
`command-remapping`.
Then again, maybe we don't really need to check (eq this-command mc)
at all, and just make sure `lookup-key` found a binding in `map`.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-24 14:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <165330421099.23674.7590022790639219967@vcs2.savannah.gnu.org>
[not found] ` <20220523111011.525EAC051FF@vcs2.savannah.gnu.org>
2022-05-23 12:41 ` master e5d76634a2: Make remapped keys work in set-transient-map Stefan Monnier
2022-05-24 12:56 ` Lars Ingebrigtsen
2022-05-24 14:00 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.