aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2011-09-16 10:14:48 -0400
committerStefan Monnier2011-09-16 10:14:48 -0400
commit91a15bc634398fbf5092d4116022d45bc2ec3784 (patch)
tree39720ae0a80b9ef98ce3ad9d86b5df6c40c0d43a /src
parente69df5166910ac0581c1ae66159b741294904006 (diff)
downloademacs-91a15bc634398fbf5092d4116022d45bc2ec3784.tar.gz
emacs-91a15bc634398fbf5092d4116022d45bc2ec3784.zip
* src/eval.c (Fquote): Document its non-consing behavior.
Fixes: debbugs:9482
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/eval.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index cf75c28c385..9ce2629d442 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
4
12011-09-16 Eli Zaretskii <eliz@gnu.org> 52011-09-16 Eli Zaretskii <eliz@gnu.org>
2 6
3 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see 7 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
diff --git a/src/eval.c b/src/eval.c
index 57a273cd4aa..32b9d366fc3 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -475,6 +475,14 @@ usage: (setq [SYM VAL]...) */)
475 475
476DEFUN ("quote", Fquote, Squote, 1, UNEVALLED, 0, 476DEFUN ("quote", Fquote, Squote, 1, UNEVALLED, 0,
477 doc: /* Return the argument, without evaluating it. `(quote x)' yields `x'. 477 doc: /* Return the argument, without evaluating it. `(quote x)' yields `x'.
478Warning: `quote' does not construct its return value, but just returns
479the value that was pre-constructed by the Lisp reader (see info node
480`(elisp)Printed Representation').
481This means that '(a . b) is not identical to (cons 'a 'b): the former
482does not cons. Quoting should be reserved for constants that will
483never be modified by side-effects, unless you like self-modifying code.
484See the common pitfall in info node `(elisp)Rearrangement' for an example
485of unexpected results when a quoted object is modified.
478usage: (quote ARG) */) 486usage: (quote ARG) */)
479 (Lisp_Object args) 487 (Lisp_Object args)
480{ 488{