Mercurial > hg > xemacs-beta
diff man/lispref/objects.texi @ 3543:c136144fe765
[xemacs-hg @ 2006-08-04 22:55:04 by aidan]
Raw strings, from Python via SXEmacs
author | aidan |
---|---|
date | Fri, 04 Aug 2006 22:55:19 +0000 |
parents | 84ee3ca77e7f |
children | dc697b1b786f |
line wrap: on
line diff
--- a/man/lispref/objects.texi Fri Aug 04 21:50:46 2006 +0000 +++ b/man/lispref/objects.texi Fri Aug 04 22:55:19 2006 +0000 @@ -1079,6 +1079,16 @@ escape any backslash or double-quote characters in the string with a backslash, like this: @code{"this \" is an embedded quote"}. + An alternative syntax allows insertion of raw backslashes into a +string, like this: @code{#r"this \ is an embedded backslash"}. In such +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 +taken, you can specify @code{u} or @code{U} after the @code{#r} to +specify that interpretation of Unicode escapes should be done. + 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 character in the string. But an escaped newline---one that is preceded