diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-06-18 11:08:23 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2022-06-18 11:22:58 +0200 |
commit | e321f87aa76c959faed784851b65ab7ada3fd129 (patch) | |
tree | 0f3450adff77e3a73df7b5786c39333b58e09e97 /lisp/edmacro.el | |
parent | 15238e2ed0eeba82fd43efbbd4b9237394f9fd55 (diff) | |
download | emacs-e321f87aa76c959faed784851b65ab7ada3fd129.tar.gz |
Avoid "control-control-KEY" (bug#55738)
Constructs such as ?\C-^@ or ?\C-\C-m literally apply a Control
modifier twice which doesn't make sense at all. What is really meant
is a C0 base character with the Control modifier bit set.
This change is only stylistic in nature.
* lisp/edmacro.el (edmacro-format-keys):
* lisp/keymap.el (key-parse):
* lisp/subr.el (event-modifiers, event-basic-type):
* test/lisp/subr-tests.el (subr-test-kbd):
Use \0 and \r instead of ^@ and \C-m to represent NUL and RET
when combined with other modifiers.
Diffstat (limited to 'lisp/edmacro.el')
-rw-r--r-- | lisp/edmacro.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/edmacro.el b/lisp/edmacro.el index fe1fc086bc6..04adabd06bc 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -532,8 +532,8 @@ doubt, use whitespace." ((integerp ch) (concat (cl-loop for pf across "ACHMsS" - for bit in '(?\A-\^@ ?\C-\^@ ?\H-\^@ - ?\M-\^@ ?\s-\^@ ?\S-\^@) + for bit in '( ?\A-\0 ?\C-\0 ?\H-\0 + ?\M-\0 ?\s-\0 ?\S-\0) when (/= (logand ch bit) 0) concat (format "%c-" pf)) (let ((ch2 (logand ch (1- (ash 1 18))))) |