diff options
Diffstat (limited to 'devdocs/elisp/syntax-for-strings.html')
| -rw-r--r-- | devdocs/elisp/syntax-for-strings.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/devdocs/elisp/syntax-for-strings.html b/devdocs/elisp/syntax-for-strings.html new file mode 100644 index 00000000..5d361c75 --- /dev/null +++ b/devdocs/elisp/syntax-for-strings.html @@ -0,0 +1,15 @@ + <h4 class="subsubsection">Syntax for Strings</h4> <p>The read syntax for a string is a double-quote, an arbitrary number of characters, and another double-quote, <code>"like this"</code>. To include a double-quote in a string, precede it with a backslash; thus, <code>"\""</code> is a string containing just one double-quote character. Likewise, you can include a backslash by preceding it with another backslash, like this: <code>"this \\ is a single embedded +backslash"</code>. </p> <p>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 by ‘<samp>\</samp>’—does not become part of the string; i.e., the Lisp reader ignores an escaped newline while reading a string. An escaped space ‘<samp>\ </samp>’ is likewise ignored. </p> <div class="example"> <pre class="example">"It is useful to include newlines +in documentation strings, +but the newline is \ +ignored if escaped." + ⇒ "It is useful to include newlines +in documentation strings, +but the newline is ignored if escaped." +</pre> +</div><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Syntax-for-Strings.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Syntax-for-Strings.html</a> + </p> +</div> |
