From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/ctl_002dchar-syntax.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 devdocs/elisp/ctl_002dchar-syntax.html (limited to 'devdocs/elisp/ctl_002dchar-syntax.html') diff --git a/devdocs/elisp/ctl_002dchar-syntax.html b/devdocs/elisp/ctl_002dchar-syntax.html new file mode 100644 index 00000000..dd10d1bc --- /dev/null +++ b/devdocs/elisp/ctl_002dchar-syntax.html @@ -0,0 +1,10 @@ +

Control-Character Syntax

Control characters can be represented using yet another read syntax. This consists of a question mark followed by a backslash, caret, and the corresponding non-control character, in either upper or lower case. For example, both ‘?\^I’ and ‘?\^i’ are valid read syntax for the character C-i, the character whose value is 9.

Instead of the ‘^’, you can use ‘C-’; thus, ‘?\C-i’ is equivalent to ‘?\^I’ and to ‘?\^i’:

?\^I ⇒ 9     ?\C-I ⇒ 9
+
+

In strings and buffers, the only control characters allowed are those that exist in ASCII; but for keyboard input purposes, you can turn any character into a control character with ‘C-’. The character codes for these non-ASCII control characters include the 2**26 bit as well as the code for the corresponding non-control character. Not all text terminals can generate non-ASCII control characters, but it is straightforward to generate them using X and other window systems.

For historical reasons, Emacs treats the DEL character as the control equivalent of ?:

?\^? ⇒ 127     ?\C-? ⇒ 127
+
+

As a result, it is currently not possible to represent the character Control-?, which is a meaningful input character under X, using ‘\C-’. It is not easy to change this, as various Lisp files refer to DEL in this way.

For representing control characters to be found in files or strings, we recommend the ‘^’ syntax; for control characters in keyboard input, we prefer the ‘C-’ syntax. Which one you use does not affect the meaning of the program, but may guide the understanding of people who read it.

+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Ctl_002dChar-Syntax.html +

+
-- cgit v1.2.3