New branch for lexbind, losing all history.
[bpt/emacs.git] / src / ChangeLog.lexbind
1 2008-04-23 Miles Bader <miles@gnu.org>
2
3 * eval.c (Ffunctionp): Return nil for special forms.
4 (Qunevalled): New variable.
5 (syms_of_eval): Initialize it.
6
7 2007-10-18 Miles Bader <miles@gnu.org>
8
9 * eval.c (FletX): Test the type of VARLIST rather than just !NILP.
10 (Flet): Use XCAR instead of Fcar.
11
12 2007-10-16 Miles Bader <miles@gnu.org>
13
14 * alloc.c (make_funvec, Fpurecopy): Set the pseudo-vector type.
15
16 2006-02-10 Miles Bader <miles@gnu.org>
17
18 * eval.c (Ffunctionp): Supply new 2nd arg to Findirect_function.
19
20 2005-03-04 Miles Bader <miles@gnu.org>
21
22 * eval.c (FletX): Update Vinterpreter_lexical_environment for each
23 variable we bind, instead of all at once like `let'.
24
25 2004-08-09 Miles Bader <miles@gnu.org>
26
27 Changes from merging the funvec patch:
28
29 * eval.c (Feval, Ffuncall): Don't special-case vectors.
30 (funcall_lambda): Use FUNVEC_SIZE.
31 (Fcurry): Remove function.
32
33 Merge funvec patch.
34
35 2004-04-10 Miles Bader <miles@gnu.org>
36
37 * eval.c (Fspecialp): New function.
38 (syms_of_eval): Initialize it.
39
40 2004-04-03 Miles Bader <miles@gnu.org>
41
42 * eval.c (Feval): If a variable isn't bound lexically, fall back
43 to looking it up dynamically even if it isn't declared special.
44
45 2002-08-26 Miles Bader <miles@gnu.org>
46
47 * bytecode.c (Fbyte_code): Fsub1 can GC, so protect it.
48
49 2002-06-12 Miles Bader <miles@gnu.org>
50
51 Lexical binding changes to the byte-code interpreter:
52
53 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, Bvec_ref, Bvec_set)
54 (BdiscardN): New constants.
55 (exec_byte_code): Renamed from `Fbyte_code'.
56 Implement above new bytecodes.
57 Add ARGS-TEMPLATE, NARGS and ARGS parameters, and optionally use
58 them push initial args on the stack.
59 (Fbyte_code): New function, just call `exec_byte_code'.
60 Add additional optional arguments for `exec_byte_code'.
61 (Qand_optional, Qand_rest): New extern declarations.
62 * eval.c (Fcurry, Ffunctionp): New functions.
63 (syms_of_eval): Initialize them.
64 (funcall_lambda): Call `exec_byte_code' instead of Fbyte_code.
65 If a compiled-function object has a `push-args' slot, call the
66 byte-code interpreter without binding any arguments.
67 (Ffuncall): Add support for curried functions.
68 * lisp.h (Fbyte_code): Declare max-args as MANY.
69 (exec_byte_code): New declaration.
70
71 Lexical binding changes to the lisp interpreter:
72
73 * lisp.h (struct Lisp_Symbol): Add `declared_special' field.
74 (apply_lambda): Add new 3rd arg to decl.
75 * alloc.c (Fmake_symbol): Initialize `declared_special' field.
76 * eval.c (Vinterpreter_lexical_environment): New variable.
77 (syms_of_eval): Initialize it.
78 (Fsetq): Modify SYM's lexical binding if appropriate.
79 (Ffunction): Return a closure if within a lexical environment.
80 (Flet, FletX): Lexically bind non-defvar'd variables if inside a
81 lexical environment.
82 (Feval): Return lexical binding of variables, if they have one.
83 Pass current lexical environment to embedded lambdas. Handle closures.
84 (Ffuncall): Pass nil lexical environment to lambdas. Handle closures.
85 (funcall_lambda): Add new LEXENV argument, and lexically bind
86 arguments if it's non-nil. Bind `interpreter-lexenv' if it changed.
87 (apply_lambda): Add new LEXENV argument and pass it to funcall_lambda.
88 (Fdefvaralias, Fdefvar, Fdefconst): Mark the variable as special.
89 (Qinternal_interpreter_environment, Qclosure): New constants.
90 (syms_of_eval): Initialize them.
91 (Fdefun, Fdefmacro): Use a closure if lexical binding is active.
92 * lread.c (defvar_bool, defvar_lisp_nopro, defvar_per_buffer)
93 (defvar_kboard, defvar_int): Mark the variable as special.
94 (Vlexical_binding, Qlexical_binding): New variables.
95 (syms_of_lread): Initialize them.
96 (Fload): Bind `lexically-bound' to nil unless specified otherwise
97 in the file header.
98 (lisp_file_lexically_bound_p): New function.
99 (Qinternal_interpreter_environment): New variable.
100 * doc.c (Qclosure): New extern declaration.
101 (Fdocumentation, store_function_docstring): Handle interpreted
102 closures.
103
104 ;; arch-tag: 7cf884aa-6b48-40cb-bfca-265a1e99b3c5