From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/symbol-forms.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 devdocs/elisp/symbol-forms.html (limited to 'devdocs/elisp/symbol-forms.html') diff --git a/devdocs/elisp/symbol-forms.html b/devdocs/elisp/symbol-forms.html new file mode 100644 index 00000000..7d2da9de --- /dev/null +++ b/devdocs/elisp/symbol-forms.html @@ -0,0 +1,15 @@ +

Symbol Forms

When a symbol is evaluated, it is treated as a variable. The result is the variable’s value, if it has one. If the symbol has no value as a variable, the Lisp interpreter signals an error. For more information on the use of variables, see Variables.

In the following example, we set the value of a symbol with setq. Then we evaluate the symbol, and get back the value that setq stored.

(setq a 123)
+     ⇒ 123
+
+
(eval 'a)
+     ⇒ 123
+
+
a
+     ⇒ 123
+
+

The symbols nil and t are treated specially, so that the value of nil is always nil, and the value of t is always t; you cannot set or bind them to any other values. Thus, these two symbols act like self-evaluating forms, even though eval treats them like any other symbol. A symbol whose name starts with ‘:’ also self-evaluates in the same way; likewise, its value ordinarily cannot be changed. See Constant Variables.

+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Symbol-Forms.html +

+
-- cgit v1.2.3