GNU bug report logs - #73764
format-kbd-macro returns a key name that keymap-lookup doesn't recognize

Previous Next

Package: emacs;

Reported by: Eduardo Ochs <eduardoochs <at> gmail.com>

Date: Sat, 12 Oct 2024 04:47:02 UTC

Severity: normal

Full log


Message #17 received at 73764 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73764 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 eduardoochs <at> gmail.com
Subject: Re: bug#73764: format-kbd-macro returns a key name that
 keymap-lookup doesn't recognize
Date: Sat, 12 Oct 2024 16:51:49 +0200
On Okt 12 2024, Eli Zaretskii wrote:

>> I guess we also need to make sure `format-kbd-macro` generates
>> something that `key-valid-p` accepts.
>
> AFAICS, that's impossible without completely rewriting its code.  It
> proceeds from left to right (i.e. from MSB to LSB).

The issue here is that C-h is a character on its own, unlike, say, C-+.

ELISP> (format-kbd-macro [?\M-\C-+])
"C-M-+"

Maybe key-valid-p should accept those control characters as the last
component as a special case.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




This bug report was last modified 340 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.