[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master e5d76634a2: Make remapped keys work in set-transient-map
From: |
Stefan Monnier |
Subject: |
Re: master e5d76634a2: Make remapped keys work in set-transient-map |
Date: |
Mon, 23 May 2022 08:41:25 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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
- Re: master e5d76634a2: Make remapped keys work in set-transient-map,
Stefan Monnier <=