aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorStefan Monnier2010-12-12 23:04:15 -0500
committerStefan Monnier2010-12-12 23:04:15 -0500
commitf07a954eeb0930029104402e706165bf89853576 (patch)
tree143d5c5a95904a0559d555ae6fe97eaed7839211 /src/lread.c
parent2c302df3a13236bfbf8ea1b771d13618fcda8d71 (diff)
downloademacs-f07a954eeb0930029104402e706165bf89853576.tar.gz
emacs-f07a954eeb0930029104402e706165bf89853576.zip
Make the effect of (defvar foo) local.
* src/eval.c (apply_lambda): Make static. Remove eval_flag arg. (Fsetq): Don't check declared_special. (Fdefun, Fdefmacro): Use Ffunction. (Fdefvar): Don't set declared_special for (defvar foo). (FletX): Check locally-special vars. Only do specbind once. (Flet): Check locally-special vars. (Feval): Don't check declared_special. (funcall_lambda): Check locally-special vars. * src/lisp.h (apply_lambda): Remove extern declaration. * src/lread.c (readevalloop): CSE. * lisp/subr.el (with-lexical-binding): Remove.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lread.c b/src/lread.c
index 83c94b02e23..d85d146b157 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1767,10 +1767,9 @@ readevalloop (Lisp_Object readcharfun,
1767 the file's header, or via a buffer-local variable), create an empty 1767 the file's header, or via a buffer-local variable), create an empty
1768 lexical environment, otherwise, turn off lexical binding. */ 1768 lexical environment, otherwise, turn off lexical binding. */
1769 lex_bound = find_symbol_value (Qlexical_binding); 1769 lex_bound = find_symbol_value (Qlexical_binding);
1770 if (NILP (lex_bound) || EQ (lex_bound, Qunbound)) 1770 specbind (Qinternal_interpreter_environment,
1771 specbind (Qinternal_interpreter_environment, Qnil); 1771 NILP (lex_bound) || EQ (lex_bound, Qunbound)
1772 else 1772 ? Qnil : Fcons (Qt, Qnil));
1773 specbind (Qinternal_interpreter_environment, Fcons (Qt, Qnil));
1774 1773
1775 GCPRO4 (sourcename, readfun, start, end); 1774 GCPRO4 (sourcename, readfun, start, end);
1776 1775