From: Eli Zaretskii <eliz@gnu.org>
To: Eduardo Ochs <eduardoochs@gmail.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 73764@debbugs.gnu.org
Subject: bug#73764: format-kbd-macro returns a key name that keymap-lookup doesn't recognize
Date: Sat, 12 Oct 2024 12:18:37 +0300 [thread overview]
Message-ID: <86plo5y902.fsf@gnu.org> (raw)
In-Reply-To: <CADs++6jwK14-SNxjbPoRfajnyMKHpJkRk=-zN+hc+8jubWEj5w@mail.gmail.com> (message from Eduardo Ochs on Sat, 12 Oct 2024 01:46:26 -0300)
> From: Eduardo Ochs <eduardoochs@gmail.com>
> Date: Sat, 12 Oct 2024 01:46:26 -0300
>
> if we run this
>
> (format-kbd-macro (read-key-sequence-vector "Type C-M-h:"))
>
> we get "M-C-h". But try:
>
> (keymap-lookup global-map "M-C-h")
> ;;-> "M-C-h" is not a valid key definition; see `key-valid-p'
>
> (keymap-lookup global-map "C-M-h")
> ;;-> mark-defun
This is because key-valid-p is too restrictive: it only accepts
modifiers in the canonical order A-C-H-M-S-s. But key-parse, which is
called by keymap-lookup, accepts and correctly processes the modifiers
in any order:
(key-parse "M-C-h")
=> [134217736]
Should we fix key-valid-p to be more lenient? Or maybe just remove
the call to keymap--check from keymap-look up?
Stefan, WDYT?
next prev parent reply other threads:[~2024-10-12 9:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-12 4:46 bug#73764: format-kbd-macro returns a key name that keymap-lookup doesn't recognize Eduardo Ochs
2024-10-12 9:18 ` Eli Zaretskii [this message]
2024-10-12 13:33 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-12 14:36 ` Eli Zaretskii
2024-10-12 14:51 ` Andreas Schwab
2024-10-12 15:18 ` Eli Zaretskii
2024-10-14 15:06 ` Robert Pluim
2024-10-14 15:54 ` Eli Zaretskii
2024-10-14 16:25 ` Eli Zaretskii
2024-10-14 21:48 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86plo5y902.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73764@debbugs.gnu.org \
--cc=eduardoochs@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).