GNU bug report logs - #73849
31.0.50; Binding ESC does not throw an error, but binding any M- combination afterwards does

Previous Next

Package: emacs;

Reported by: Alexander Prähauser <ahprae <at> protonmail.com>

Date: Thu, 17 Oct 2024 10:22:02 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alexander Prähauser <ahprae <at> protonmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 73849 <at> debbugs.gnu.org
Subject: bug#73849: 31.0.50; Binding ESC does not throw an error, but binding any M- combination afterwards does
Date: Thu, 17 Oct 2024 14:05:55 +0300
> Date: Thu, 17 Oct 2024 10:18:18 +0000
> From:  Alexander Prähauser via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> If I eval the following
> 
> (progn (defvar-keymap test-map)
>        (define-key test-map (kbd "ESC") #'test)
>        (define-key test-map (kbd "M-i") #'test))
> 
> I get an error
> 
> (error "Key sequence M-i starts with non-prefix key ESC")
> 
> And I get the same error if I try to bind any other key combination
> containing a Meta modifier, including ones which also contain other modifiers.
> Crucially, I do not get an error while binding ESC itself, which I guess
> is what should happen. The error only appears while trying to bind Meta
> keys in the map containing ESC. It also doesn't seem to happen if I bind
> M-i using a vector instead of kbd.
> 
> This was tried while starting Emacs without an
> init.

I don't think this is a bug, this is how Emacs handling of Meta always
worked.

Stefan, any comments or suggestions?




This bug report was last modified 237 days ago.

Previous Next


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