emacs-devel
[Top][All Lists]
Advanced

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

Re: set-transient-map and a question


From: Robert Pluim
Subject: Re: set-transient-map and a question
Date: Tue, 11 Jul 2023 10:03:34 +0200

>>>>> On Mon, 10 Jul 2023 18:12:18 -0700, "T.V Raman" <raman@google.com> said:

    T> set-transient-map is used in text-scale-adjust here:
    T> 
https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/face-remap.el?h=master#n423...

    T> But it looks like it passes nil as the keep-pressed arg which sounds
    T> counter to the documentation for set-transient-map; but
    T> text-scale-adjust does work as intended  -- so am I reading the
    T> set-transient-map doc incorrectly?

All the bindings in that map in `text-scale-adjust' call
`text-scale-adjust', which then results in `set-transient-mapʼ being
called again, which means you donʼt need any logic to de-activate the
transient keymap when someone presses a non-text-scale-adjust key.

(Iʼve just realized `text-scale-adjust' actually uses a minor-mode,
which seems like overkill, but it works)

Robert
-- 



reply via email to

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