* lisp/subr.el (save-window-excursion): New macro, moved from C.
[bpt/emacs.git] / src / ChangeLog
1 2011-02-19 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * window.c (Fsave_window_excursion): Remove. Moved to Lisp.
4 (syms_of_window): Don't defsubr it.
5 * window.h (Fsave_window_excursion): Don't declare it.
6 * bytecode.c (exec_byte_code): Inline Fsave_window_excursion.
7
8 2011-02-17 Stefan Monnier <monnier@iro.umontreal.ca>
9
10 * eval.c (Vinternal_interpreter_environment): Remove.
11 (syms_of_eval): Do declare Vinternal_interpreter_environment as
12 a global lisp var, but unintern it to hide it.
13 (Fcommandp):
14 * data.c (Finteractive_form): Understand `closure's.
15
16 * bytecode.c (exec_byte_code): Fix handling of &rest.
17
18 2011-02-12 Stefan Monnier <monnier@iro.umontreal.ca>
19
20 * bytecode.c (Bvec_ref, Bvec_set): Remove.
21 (exec_byte_code): Don't handle them.
22
23 2010-12-27 Stefan Monnier <monnier@iro.umontreal.ca>
24
25 * eval.c (Fdefvar): Record specialness before computing initial value.
26
27 2010-12-15 Stefan Monnier <monnier@iro.umontreal.ca>
28
29 * eval.c (Feval): Add `lexical' argument. Adjust callers.
30 (Ffuncall, eval_sub): Avoid goto.
31
32 2010-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
33
34 Try and be more careful about propagation of lexical environment.
35 * eval.c (apply_lambda, funcall_lambda): Remove lexenv arg.
36 (Feval): Always eval in the empty environment.
37 (eval_sub): New function. Use it for all calls to Feval that should
38 evaluate in the lexical environment of the caller.
39 Pass `closure's as is to apply_lambda.
40 (Ffuncall): Pass `closure's as is to funcall_lambda.
41 (funcall_lambda): Extract lexenv for `closure's, when applicable.
42 Also use lexical scoping for the &rest argument, if applicable.
43 * lisp.h (eval_sub): Declare.
44 * lread.c (readevalloop): Remove `evalfun' argument.
45 * print.c (Fwith_output_to_temp_buffer):
46 * data.c (Fsetq_default): Use eval_sub.
47
48 2010-12-13 Stefan Monnier <monnier@iro.umontreal.ca>
49
50 Make the effect of (defvar foo) local.
51 * eval.c (apply_lambda): Make static. Remove eval_flag arg.
52 (Fsetq): Don't check declared_special.
53 (Fdefun, Fdefmacro): Use Ffunction.
54 (Fdefvar): Don't set declared_special for (defvar foo).
55 (FletX): Check locally-special vars. Only do specbind once.
56 (Flet): Check locally-special vars.
57 (Feval): Don't check declared_special.
58 (funcall_lambda): Check locally-special vars.
59 * lisp.h (apply_lambda): Remove extern declaration.
60 * lread.c (readevalloop): CSE.
61
62 2010-07-23 Andreas Schwab <schwab@linux-m68k.org>
63
64 * eval.c (funcall_funvec): Replace bcopy by memcpy.
65
66 2010-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
67
68 * eval.c (Fspecial_variable_p): Rename from `specialp'.
69
70 2010-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
71
72 * bytecode.c (exec_byte_code):
73 * eval.c (Ffunctionp): Fix up int/Lisp_Object confusions.
74
75 2008-04-23 Miles Bader <miles@gnu.org>
76
77 * eval.c (Ffunctionp): Return nil for special forms.
78 (Qunevalled): New variable.
79 (syms_of_eval): Initialize it.
80
81 2007-10-18 Miles Bader <miles@gnu.org>
82
83 * eval.c (FletX): Test the type of VARLIST rather than just !NILP.
84 (Flet): Use XCAR instead of Fcar.
85
86 2007-10-16 Miles Bader <miles@gnu.org>
87
88 * alloc.c (make_funvec, Fpurecopy): Set the pseudo-vector type.
89
90 2006-02-10 Miles Bader <miles@gnu.org>
91
92 * eval.c (Ffunctionp): Supply new 2nd arg to Findirect_function.
93
94 2005-03-04 Miles Bader <miles@gnu.org>
95
96 * eval.c (FletX): Update Vinterpreter_lexical_environment for each
97 variable we bind, instead of all at once like `let'.
98
99 2004-08-09 Miles Bader <miles@gnu.org>
100
101 Changes from merging the funvec patch:
102
103 * eval.c (Feval, Ffuncall): Don't special-case vectors.
104 (funcall_lambda): Use FUNVEC_SIZE.
105 (Fcurry): Remove function.
106
107 Merge funvec patch.
108
109 2004-04-10 Miles Bader <miles@gnu.org>
110
111 * eval.c (Fspecialp): New function.
112 (syms_of_eval): Initialize it.
113
114 2004-04-03 Miles Bader <miles@gnu.org>
115
116 * eval.c (Feval): If a variable isn't bound lexically, fall back
117 to looking it up dynamically even if it isn't declared special.
118
119 2002-08-26 Miles Bader <miles@gnu.org>
120
121 * bytecode.c (Fbyte_code): Fsub1 can GC, so protect it.
122
123 2002-06-12 Miles Bader <miles@gnu.org>
124
125 Lexical binding changes to the byte-code interpreter:
126
127 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, Bvec_ref, Bvec_set)
128 (BdiscardN): New constants.
129 (exec_byte_code): Rename from `Fbyte_code'.
130 Implement above new bytecodes.
131 Add ARGS-TEMPLATE, NARGS and ARGS parameters, and optionally use
132 them push initial args on the stack.
133 (Fbyte_code): New function, just call `exec_byte_code'.
134 Add additional optional arguments for `exec_byte_code'.
135 (Qand_optional, Qand_rest): New extern declarations.
136 * eval.c (Fcurry, Ffunctionp): New functions.
137 (syms_of_eval): Initialize them.
138 (funcall_lambda): Call `exec_byte_code' instead of Fbyte_code.
139 If a compiled-function object has a `push-args' slot, call the
140 byte-code interpreter without binding any arguments.
141 (Ffuncall): Add support for curried functions.
142 * lisp.h (Fbyte_code): Declare max-args as MANY.
143 (exec_byte_code): New declaration.
144
145 Lexical binding changes to the lisp interpreter:
146
147 * lisp.h (struct Lisp_Symbol): Add `declared_special' field.
148 (apply_lambda): Add new 3rd arg to decl.
149 * alloc.c (Fmake_symbol): Initialize `declared_special' field.
150 * eval.c (Vinterpreter_lexical_environment): New variable.
151 (syms_of_eval): Initialize it.
152 (Fsetq): Modify SYM's lexical binding if appropriate.
153 (Ffunction): Return a closure if within a lexical environment.
154 (Flet, FletX): Lexically bind non-defvar'd variables if inside a
155 lexical environment.
156 (Feval): Return lexical binding of variables, if they have one.
157 Pass current lexical environment to embedded lambdas. Handle closures.
158 (Ffuncall): Pass nil lexical environment to lambdas. Handle closures.
159 (funcall_lambda): Add new LEXENV argument, and lexically bind
160 arguments if it's non-nil. Bind `interpreter-lexenv' if it changed.
161 (apply_lambda): Add new LEXENV argument and pass it to funcall_lambda.
162 (Fdefvaralias, Fdefvar, Fdefconst): Mark the variable as special.
163 (Qinternal_interpreter_environment, Qclosure): New constants.
164 (syms_of_eval): Initialize them.
165 (Fdefun, Fdefmacro): Use a closure if lexical binding is active.
166 * lread.c (defvar_bool, defvar_lisp_nopro, defvar_per_buffer)
167 (defvar_kboard, defvar_int): Mark the variable as special.
168 (Vlexical_binding, Qlexical_binding): New variables.
169 (syms_of_lread): Initialize them.
170 (Fload): Bind `lexically-bound' to nil unless specified otherwise
171 in the file header.
172 (lisp_file_lexically_bound_p): New function.
173 (Qinternal_interpreter_environment): New variable.
174 * doc.c (Qclosure): New extern declaration.
175 (Fdocumentation, store_function_docstring): Handle interpreted
176 closures.
177
178 ;; arch-tag: 7cf884aa-6b48-40cb-bfca-265a1e99b3c5