aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorStefan Monnier2013-08-28 14:27:26 -0400
committerStefan Monnier2013-08-28 14:27:26 -0400
commit3ec7babc5c774d9a24dbe68951091eb2bab08e60 (patch)
treee97a3e22196912f28e33c03dc49cced0833f72bb /src/eval.c
parent2d69b99e59e81113bf27faa209fb9b060f3244d4 (diff)
downloademacs-3ec7babc5c774d9a24dbe68951091eb2bab08e60.tar.gz
emacs-3ec7babc5c774d9a24dbe68951091eb2bab08e60.zip
* src/eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
scoped code. Fixes: debbugs:11258
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/eval.c b/src/eval.c
index 566be0c2a83..1ce14ae94a6 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2149,6 +2149,8 @@ eval_sub (Lisp_Object form)
2149 if (SYMBOLP (fun) && !NILP (fun) 2149 if (SYMBOLP (fun) && !NILP (fun)
2150 && (fun = XSYMBOL (fun)->function, SYMBOLP (fun))) 2150 && (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
2151 fun = indirect_function (fun); 2151 fun = indirect_function (fun);
2152 else
2153 fun = Ffunction (Fcons (fun, Qnil));
2152 2154
2153 if (SUBRP (fun)) 2155 if (SUBRP (fun))
2154 { 2156 {
@@ -3151,20 +3153,17 @@ let_shadows_global_binding_p (Lisp_Object symbol)
3151 return 0; 3153 return 0;
3152} 3154}
3153 3155
3154/* `specpdl_ptr->symbol' is a field which describes which variable is 3156/* `specpdl_ptr' describes which variable is
3155 let-bound, so it can be properly undone when we unbind_to. 3157 let-bound, so it can be properly undone when we unbind_to.
3156 It can have the following two shapes: 3158 It can be either a plain SPECPDL_LET or a SPECPDL_LET_LOCAL/DEFAULT.
3157 - SYMBOL : if it's a plain symbol, it means that we have let-bound 3159 - SYMBOL is the variable being bound. Note that it should not be
3158 a symbol that is not buffer-local (at least at the time
3159 the let binding started). Note also that it should not be
3160 aliased (i.e. when let-binding V1 that's aliased to V2, we want 3160 aliased (i.e. when let-binding V1 that's aliased to V2, we want
3161 to record V2 here). 3161 to record V2 here).
3162 - (SYMBOL WHERE . BUFFER) : this means that it is a let-binding for 3162 - WHERE tells us in which buffer the binding took place.
3163 variable SYMBOL which can be buffer-local. WHERE tells us 3163 This is used for SPECPDL_LET_LOCAL bindings (i.e. bindings to a
3164 which buffer is affected (or nil if the let-binding affects the 3164 buffer-local variable) as well as for SPECPDL_LET_DEFAULT bindings,
3165 global value of the variable) and BUFFER tells us which buffer was 3165 i.e. bindings to the default value of a variable which can be
3166 current (i.e. if WHERE is non-nil, then BUFFER==WHERE, otherwise 3166 buffer-local. */
3167 BUFFER did not yet have a buffer-local value). */
3168 3167
3169void 3168void
3170specbind (Lisp_Object symbol, Lisp_Object value) 3169specbind (Lisp_Object symbol, Lisp_Object value)