[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105794: * src/eval.c (Fquote): Docum
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105794: * src/eval.c (Fquote): Document its non-consing behavior. |
Date: |
Fri, 16 Sep 2011 10:14:48 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105794
fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9482
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2011-09-16 10:14:48 -0400
message:
* src/eval.c (Fquote): Document its non-consing behavior.
modified:
src/ChangeLog
src/eval.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-09-16 10:25:39 +0000
+++ b/src/ChangeLog 2011-09-16 14:14:48 +0000
@@ -1,3 +1,7 @@
+2011-09-16 Stefan Monnier <address@hidden>
+
+ * eval.c (Fquote): Document its non-consing behavior (bug#9482).
+
2011-09-16 Eli Zaretskii <address@hidden>
* image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
=== modified file 'src/eval.c'
--- a/src/eval.c 2011-09-09 01:06:52 +0000
+++ b/src/eval.c 2011-09-16 14:14:48 +0000
@@ -475,6 +475,14 @@
DEFUN ("quote", Fquote, Squote, 1, UNEVALLED, 0,
doc: /* Return the argument, without evaluating it. `(quote x)' yields
`x'.
+Warning: `quote' does not construct its return value, but just returns
+the value that was pre-constructed by the Lisp reader (see info node
+`(elisp)Printed Representation').
+This means that '(a . b) is not identical to (cons 'a 'b): the former
+does not cons. Quoting should be reserved for constants that will
+never be modified by side-effects, unless you like self-modifying code.
+See the common pitfall in info node `(elisp)Rearrangement' for an example
+of unexpected results when a quoted object is modified.
usage: (quote ARG) */)
(Lisp_Object args)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105794: * src/eval.c (Fquote): Document its non-consing behavior.,
Stefan Monnier <=