emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : New key binding syntax


From: Drew Adams
Subject: RE: [External] : New key binding syntax
Date: Sat, 13 Nov 2021 18:47:13 +0000

> I also wonder if there could be confusion between M-RET
> and M-<return> if the former can be written M-ret and
> the latter can me written M-return.

There's no confusion.  (And the former cannot be written
M-ret.)

(naked "M-RET")    -> [134217741] (Meta + ASCII RET)
(naked "M-return") -> [M-return]  (Meta + function key
                                   return, aka <return>) 
(naked "M-ret")    -> [M-ret]     (Meta + a function key
                                   named ret, aka <ret>) 

With angle brackets, the results are identical (and the
same as what `kbd' gives you):

(naked "M-<RET>")    -> [134217741]
(naked "M-<return>") -> [M-return]
(naked "M-<ret>")    -> [M-ret]

Vanilla Emacs already treats the ASCII control chars
specially (with the exception of TAB (C-i) - see bug
#12535).  That's so with and without modifiers.

`naked' does the same thing.  It even lets you
manifest bug #12535, if you really want bug-for-bug
compatibility.  (Just provide a non-nil second arg
ANGLES, to get exactly the (bugged) `kbd' behavior.)

(naked "TAB")     -> "  "  (that's a TAB char)
(naked "<TAB>")   -> "  "  (same thing)
(naked "<TAB>" t) -> [TAB] (bug #12535)
(naked "<tab>")   -> [tab]

> I don't see how to come up with an answer that is
> rigorously correct,for these questions.

Try naked.el, and see if you find a case that is not
rigorously correct.  None has been presented, so far.

https://www.emacswiki.org/emacs/download/naked.el

reply via email to

[Prev in Thread] Current Thread [Next in Thread]