summaryrefslogtreecommitdiff
path: root/lispref/objects.texi
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2003-07-22 15:17:28 +0000
committerRichard M. Stallman <rms@gnu.org>2003-07-22 15:17:28 +0000
commit6efdb8e54c4c5015b7b5f2693e9b617b6d02a57a (patch)
tree2bdef5e57ebaa499225f800738d9b550afba98ff /lispref/objects.texi
parent131bf943644db99c59a783050ab78d70e4bae2cc (diff)
downloademacs-6efdb8e54c4c5015b7b5f2693e9b617b6d02a57a.tar.gz
(Character Type): Don't use space as example for \.
Make list of char names and \-sequences correspond. Explain that \s is not used in strings. `\ ' needs space after.
Diffstat (limited to 'lispref/objects.texi')
-rw-r--r--lispref/objects.texi28
1 files changed, 17 insertions, 11 deletions
diff --git a/lispref/objects.texi b/lispref/objects.texi
index c2713a0f7c9..309071920d8 100644
--- a/lispref/objects.texi
+++ b/lispref/objects.texi
@@ -258,9 +258,9 @@ character @kbd{a}.
You can use the same syntax for punctuation characters, but it is
often a good idea to add a @samp{\} so that the Emacs commands for
-editing Lisp code don't get confused. For example, @samp{?\ } is the
-way to write the space character. If the character is @samp{\}, you
-@emph{must} use a second @samp{\} to quote it: @samp{?\\}.
+editing Lisp code don't get confused. For example, @samp{?\(} is the
+way to write the open-paren character. If the character is @samp{\},
+you @emph{must} use a second @samp{\} to quote it: @samp{?\\}.
@cindex whitespace
@cindex bell character
@@ -281,13 +281,14 @@ way to write the space character. If the character is @samp{\}, you
@cindex @samp{\e}
@cindex space
@cindex @samp{\s}
- You can express the characters Control-g, backspace, tab, newline,
+ You can express the characters control-g, backspace, tab, newline,
vertical tab, formfeed, space, return, del, and escape as @samp{?\a},
@samp{?\b}, @samp{?\t}, @samp{?\n}, @samp{?\v}, @samp{?\f},
-@samp{?\r}, @samp{?\d}, @samp{?\e}, and @samp{?\s}, respectively. Thus,
+@samp{?\s}, @samp{?\r}, @samp{?\d}, and @samp{?\e}, respectively.
+Thus,
@example
-?\a @result{} 7 ; @r{@kbd{C-g}}
+?\a @result{} 7 ; @r{control-g, @kbd{C-g}}
?\b @result{} 8 ; @r{backspace, @key{BS}, @kbd{C-h}}
?\t @result{} 9 ; @r{tab, @key{TAB}, @kbd{C-i}}
?\n @result{} 10 ; @r{newline, @kbd{C-j}}
@@ -302,8 +303,10 @@ vertical tab, formfeed, space, return, del, and escape as @samp{?\a},
@cindex escape sequence
These sequences which start with backslash are also known as
-@dfn{escape sequences}, because backslash plays the role of an escape
-character; this usage has nothing to do with the character @key{ESC}.
+@dfn{escape sequences}, because backslash plays the role of an
+``escape character''; this terminology has nothing to do with the
+character @key{ESC}. @samp{\s} is meant for use only in character
+constants; in string constants, just write the space.
@cindex control characters
Control characters may be represented using yet another read syntax.
@@ -410,8 +413,8 @@ represents the shifted-control-o character.
in a character: @dfn{hyper}, @dfn{super} and @dfn{alt}. The syntaxes
for these bits are @samp{\H-}, @samp{\s-} and @samp{\A-}. (Case is
significant in these prefixes.) Thus, @samp{?\H-\M-\A-x} represents
-@kbd{Alt-Hyper-Meta-x}. Note that @samp{\s} (without the @samp{-})
-represents the space character.
+@kbd{Alt-Hyper-Meta-x}. (Note that @samp{\s} with no following @samp{-}
+represents the space character.)
@tex
Numerically, the
bit values are @math{2^{22}} for alt, @math{2^{23}} for super and @math{2^{24}} for hyper.
@@ -457,10 +460,13 @@ a special escape meaning; thus, @samp{?\+} is equivalent to @samp{?+}.
There is no reason to add a backslash before most characters. However,
you should add a backslash before any of the characters
@samp{()\|;'`"#.,} to avoid confusing the Emacs commands for editing
-Lisp code. Also add a backslash before whitespace characters such as
+Lisp code. You can also add a backslash before whitespace characters such as
space, tab, newline and formfeed. However, it is cleaner to use one of
the easily readable escape sequences, such as @samp{\t} or @samp{\s},
instead of an actual whitespace character such as a tab or a space.
+(If you do write backslash followed by a space, you should write
+an extra space after the character constant to separate it from the
+following text.)
@node Symbol Type
@subsection Symbol Type