Mercurial > hg > xemacs-beta
changeset 4265:dc697b1b786f
[xemacs-hg @ 2007-11-14 18:20:41 by aidan]
Document how one can include a trailing backslash in a raw string.
author | aidan |
---|---|
date | Wed, 14 Nov 2007 18:20:42 +0000 |
parents | 9db20cbbe4c7 |
children | c5a2b80bc4fa |
files | man/ChangeLog man/lispref/objects.texi |
diffstat | 2 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/man/ChangeLog Wed Nov 14 18:06:52 2007 +0000 +++ b/man/ChangeLog Wed Nov 14 18:20:42 2007 +0000 @@ -1,3 +1,9 @@ +2007-11-14 Aidan Kehoe <kehoea@parhasard.net> + + * lispref/objects.texi (String Type): + Describe how one can include a trailing backslash in a raw string, + by means of the Unicode escape syntax. + 2007-11-14 Aidan Kehoe <kehoea@parhasard.net> * xemacs/keystrokes.texi (Character Representation):
--- a/man/lispref/objects.texi Wed Nov 14 18:06:52 2007 +0000 +++ b/man/lispref/objects.texi Wed Nov 14 18:20:42 2007 +0000 @@ -1084,10 +1084,13 @@ a string, each character following a backslash is included literally in the string, and all backslashes are left in the string. This means that @code{#r"\""} is a valid string literal with two characters, a backslash and a -double-quote. It also means that a string with this syntax @emph{cannot end -in a single backslash}. As with Python, from where this syntax was +double-quote. It also means that a string with this syntax cannot end +in a single backslash. As with Python, from where this syntax was taken, you can specify @code{u} or @code{U} after the @code{#r} to -specify that interpretation of Unicode escapes should be done. +specify that interpretation of Unicode escapes should be +done---@pxref{Character Type}---and if you use @code{#ru} for your raw +strings, the restriction on the trailing backslash can be worked around +like so: @code{#ru"Backslash: \u005C"}. The newline character is not special in the read syntax for strings; if you write a new line between the double-quotes, it becomes a