diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/elisp/quoting.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/elisp/quoting.html')
| -rw-r--r-- | devdocs/elisp/quoting.html | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/devdocs/elisp/quoting.html b/devdocs/elisp/quoting.html deleted file mode 100644 index 8b79401d..00000000 --- a/devdocs/elisp/quoting.html +++ /dev/null @@ -1,26 +0,0 @@ - <h3 class="section">Quoting</h3> <p>The special form <code>quote</code> returns its single argument, as written, without evaluating it. This provides a way to include constant symbols and lists, which are not self-evaluating objects, in a program. (It is not necessary to quote self-evaluating objects such as numbers, strings, and vectors.) </p> <dl> <dt id="quote">Special Form: <strong>quote</strong> <em>object</em> -</dt> <dd><p>This special form returns <var>object</var>, without evaluating it. The returned value might be shared and should not be modified. See <a href="self_002devaluating-forms">Self-Evaluating Forms</a>. </p></dd> -</dl> <p>Because <code>quote</code> is used so often in programs, Lisp provides a convenient read syntax for it. An apostrophe character (‘<samp>'</samp>’) followed by a Lisp object (in read syntax) expands to a list whose first element is <code>quote</code>, and whose second element is the object. Thus, the read syntax <code>'x</code> is an abbreviation for <code>(quote x)</code>. </p> <p>Here are some examples of expressions that use <code>quote</code>: </p> <div class="example"> <pre class="example">(quote (+ 1 2)) - ⇒ (+ 1 2) -</pre> -<pre class="example">(quote foo) - ⇒ foo -</pre> -<pre class="example">'foo - ⇒ foo -</pre> -<pre class="example">''foo - ⇒ 'foo -</pre> -<pre class="example">'(quote foo) - ⇒ 'foo -</pre> -<pre class="example">['foo] - ⇒ ['foo] -</pre> -</div> <p>Although the expressions <code>(list '+ 1 2)</code> and <code>'(+ 1 2)</code> both yield lists equal to <code>(+ 1 2)</code>, the former yields a freshly-minted mutable list whereas the latter yields a list built from conses that might be shared and should not be modified. See <a href="self_002devaluating-forms">Self-Evaluating Forms</a>. </p> <p>Other quoting constructs include <code>function</code> (see <a href="anonymous-functions">Anonymous Functions</a>), which causes an anonymous lambda expression written in Lisp to be compiled, and ‘<samp>`</samp>’ (see <a href="backquote">Backquote</a>), which is used to quote only part of a list, while computing and substituting other parts. </p><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/Quoting.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Quoting.html</a> - </p> -</div> |
