summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-12-27 12:55:38 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2010-12-27 12:55:38 -0500
commit590130fb19e1f433965c421d98fedeb2d7c33310 (patch)
treeed68c41e9255c9b6bda9e4a9f777e6af759d736c /src/eval.c
parenta0ee6f2751acba71df443d4d795bb350eb6421dd (diff)
downloademacs-590130fb19e1f433965c421d98fedeb2d7c33310.tar.gz
* src/eval.c (Fdefvar): Record specialness before computing initial value.
* lisp/emacs-lisp/bytecomp.el (byte-compile-track-mouse): Don't use #'.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c
index 7104a8a8396..36acca01c8b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -855,6 +855,10 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
tem = Fdefault_boundp (sym);
if (!NILP (tail))
{
+ if (SYMBOLP (sym))
+ /* Do it before evaluating the initial value, for self-references. */
+ XSYMBOL (sym)->declared_special = 1;
+
if (SYMBOL_CONSTANT_P (sym))
{
/* For upward compatibility, allow (defvar :foo (quote :foo)). */
@@ -893,9 +897,6 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
Fput (sym, Qvariable_documentation, tem);
}
LOADHIST_ATTACH (sym);
-
- if (SYMBOLP (sym))
- XSYMBOL (sym)->declared_special = 1;
}
else if (!NILP (Vinternal_interpreter_environment)
&& !XSYMBOL (sym)->declared_special)