help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Explanation Request for the Function set-transient-map in subr.el


From: Stefan Monnier
Subject: Re: Explanation Request for the Function set-transient-map in subr.el
Date: Sun, 28 Nov 2021 14:45:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

xenodasein@tutanota.de [2021-11-28 19:12:56] wrote:
> Thanks for your clarification on isearch issue.
>>> ((eq t keep-pred)
>>>   (let ((mc (lookup-key map (this-command-keys-vector))))
>>>   ;; If the key is unbound `this-command` is
>>>   ;; nil and so is `mc`.
>>>     (and mc (eq this-command mc))))
>
> I'm still not clear why exactly this expression is used though: (eq 
> this-command mc).
> What are the possible values of mc here on the last line?

This tests whether the user typed a key-sequence from `map` as opposed
to some other one.

E.g. when you use `text-scale-adjust`, you want to "stay" in the
transient map as long as the user uses one of the keys in the `map`
(basically, +, -, or 0) and if the user types some other key, we
immediately/automatically exit from this transient map.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]