emacs-devel
[Top][All Lists]
Advanced

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

Re: Problem quitting properly from transient keymap with one keystroke


From: Stefan Monnier
Subject: Re: Problem quitting properly from transient keymap with one keystroke
Date: Fri, 20 Oct 2017 08:24:36 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> The problem is that set-transient-map uses pre-command-hook to test the
> stay-in-transient-map function and to exit, so if a keystroke sets the
> flag read by the stay-in-transient-map function to disable the transient
> map, this check is not done until another key is pressed because the
> pre-command-hook is not run again until then (so the code doesn't see
> the flag change until then).

Indeed, that's why I made `set-transient-map` return an "exit function"
which you can call when you want to explicitly leave this transient map
at a different time than when the `keep-pred` predicate is checked.


        Stefan




reply via email to

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