GNU bug report logs - #75586
31.0.50; Cannot bind <C-m> with keymap-global-set

Previous Next

Package: emacs;

Reported by: Manuel Uberti <manuel.uberti <at> inventati.org>

Date: Wed, 15 Jan 2025 16:04:01 UTC

Severity: normal

Tags: fixed

Found in version 31.0.50

Fixed in version 30.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 75586 <at> debbugs.gnu.org
Subject: Re: bug#75586: 31.0.50; Cannot bind <C-m> with keymap-global-set
Date: Thu, 16 Jan 2025 15:57:02 +0100
On 16/01/25 09:34, Robert Pluim wrote:
> C-m will always be RET. If you want "the return key" to do something
> different from RET, then you can bind "<return>", eg:
> 
> (keymap-global-set "<return>" (lambda () (interactive) (message "return")))
> (keymap-global-set "C-m" (lambda () (interactive) (message "Control-m")))
> 
> (although if the `input-decode-map' thing works for you, who am I to
> deny it? 😸)

Yes, I think I prefer my approach in this case, but thanks for sharing
another option. :)

> More importantly: which bit of the documentation can we improve so
> that itʼs clear that "RET" is spelled "C-m" for the purposes of
> `keymap-global-set'?

Maybe the `key-valid-p` documentation?

-- 
Manuel Uberti
https://manueluberti.eu




This bug report was last modified 118 days ago.

Previous Next


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