[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 95343da: Adapt Lisp reference to reader changes
From: |
Philipp Stephani |
Subject: |
[Emacs-diffs] master 95343da: Adapt Lisp reference to reader changes |
Date: |
Sun, 2 Jul 2017 06:32:30 -0400 (EDT) |
branch: master
commit 95343daa79efecdb32302fa3420a7b838d66d6bb
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>
Adapt Lisp reference to reader changes
The reader now warns about some unescaped character literals, but
still allows them for compatibility reasons. Slightly adapt the
manual to forbid them officially.
* doc/lispref/objects.texi (Basic Char Syntax): Document that
backslashes are now required before some characters.
---
doc/lispref/objects.texi | 35 ++++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 1f4c378..daa3971 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -283,11 +283,11 @@ character @kbd{a}.
?Q @result{} 81 ?q @result{} 113
@end example
- 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 open-paren character. If the character is @samp{\},
-you @emph{must} use a second @samp{\} to quote it: @samp{?\\}.
+ You can use the same syntax for punctuation characters. However, if
+the punctuation character has a special syntactic meaning in Lisp, you
+must quote it with a @samp{\}. For example, @samp{?\(} is the way to
+write the open-paren character. Likewise, if the character is
address@hidden, you must use a second @samp{\} to quote it: @samp{?\\}.
@cindex whitespace
@cindex bell character
@@ -336,18 +336,19 @@ escape character; this has nothing to do with the
character @key{ESC}. @samp{\s} is meant for use in character
constants; in string constants, just write the space.
- A backslash is allowed, and harmless, preceding any character without
-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
address@hidden()\|;'`"#.,} to avoid confusing the Emacs commands for editing
-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.)
+ A backslash is allowed, and harmless, preceding any character
+without a special escape meaning; thus, @samp{?\+} is equivalent to
address@hidden There is no reason to add a backslash before most
+characters. However, you must add a backslash before any of the
+characters @samp{()[]\;"}, and you should add a backslash before any
+of the characters @samp{|'`#.,} to avoid confusing the Emacs commands
+for editing 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
address@hidden 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 General Escape Syntax
@subsubsection General Escape Syntax
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 95343da: Adapt Lisp reference to reader changes,
Philipp Stephani <=