diff options
| author | Stefan Monnier | 2010-12-27 12:55:38 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2010-12-27 12:55:38 -0500 |
| commit | 590130fb19e1f433965c421d98fedeb2d7c33310 (patch) | |
| tree | ed68c41e9255c9b6bda9e4a9f777e6af759d736c /src/eval.c | |
| parent | a0ee6f2751acba71df443d4d795bb350eb6421dd (diff) | |
| download | emacs-590130fb19e1f433965c421d98fedeb2d7c33310.tar.gz emacs-590130fb19e1f433965c421d98fedeb2d7c33310.zip | |
* 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.c | 7 |
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) */) | |||
| 855 | tem = Fdefault_boundp (sym); | 855 | tem = Fdefault_boundp (sym); |
| 856 | if (!NILP (tail)) | 856 | if (!NILP (tail)) |
| 857 | { | 857 | { |
| 858 | if (SYMBOLP (sym)) | ||
| 859 | /* Do it before evaluating the initial value, for self-references. */ | ||
| 860 | XSYMBOL (sym)->declared_special = 1; | ||
| 861 | |||
| 858 | if (SYMBOL_CONSTANT_P (sym)) | 862 | if (SYMBOL_CONSTANT_P (sym)) |
| 859 | { | 863 | { |
| 860 | /* For upward compatibility, allow (defvar :foo (quote :foo)). */ | 864 | /* For upward compatibility, allow (defvar :foo (quote :foo)). */ |
| @@ -893,9 +897,6 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) | |||
| 893 | Fput (sym, Qvariable_documentation, tem); | 897 | Fput (sym, Qvariable_documentation, tem); |
| 894 | } | 898 | } |
| 895 | LOADHIST_ATTACH (sym); | 899 | LOADHIST_ATTACH (sym); |
| 896 | |||
| 897 | if (SYMBOLP (sym)) | ||
| 898 | XSYMBOL (sym)->declared_special = 1; | ||
| 899 | } | 900 | } |
| 900 | else if (!NILP (Vinternal_interpreter_environment) | 901 | else if (!NILP (Vinternal_interpreter_environment) |
| 901 | && !XSYMBOL (sym)->declared_special) | 902 | && !XSYMBOL (sym)->declared_special) |