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

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

bug#29141: 25.3; Precise if read-key of prefix key is active


From: Lars Ingebrigtsen
Subject: bug#29141: 25.3; Precise if read-key of prefix key is active
Date: Wed, 18 May 2022 00:12:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Pierre-Yves Luyten <py@luyten.fr> writes:

> Expected behavior
> Since the user needs to learn the core of Emacs, it is necessary to be
> able to present to the user, not only available shortuts, but also the
> name of the current keymap
>
> Behavior
> As far as i know, there is no way to say if a prefix key is active.
> One could parse which shortcuts are active, then deduce which prefix key
> is active, but this would not be very reliable.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I'm not sure I understand what is being requested here.  For instance:

(key-binding "\C-c")
=> (keymap (keymap (67108896 . erc-track-switch-buffer) (0 . 
erc-track-switch-buffer)) mode-specific-command-prefix)

If a key sequence is a prefix key, key-binding will return a keymap, so
you can check that.

As for "the name of the current keymap" -- I'm not sure I understand
that, either.  current-local-map will return that, but perhaps something
else is means?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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