GNU bug report logs - #52448
key-valid-p vs "C-M-x" and "ESC C-x"

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Sun, 12 Dec 2021 08:18:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: 52448 <at> debbugs.gnu.org
Subject: bug#52448: key-valid-p vs "C-M-x" and "ESC C-x"
Date: Sun, 12 Dec 2021 00:17:48 -0800
AFAIU, we want exactly one valid way to write keybindings with
`key-valid-p'.  Should both of these be `key-valid-p'?

1.  (key-description (kbd "ESC C-x"))
    => "C-M-x"

    (key-valid-p "ESC C-x")
    => t

2.  (key-description (kbd "C-M-x"))
    => "C-M-x"

    (key-valid-p "C-M-x")
    => t

However, there is also this, and the comment at the top of keymap.c:

    (kbd "ESC C-x")
    => "^[^X"

    (kbd "M-C-x")
    => [134217752]




This bug report was last modified 3 years and 207 days ago.

Previous Next


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