diff options
| author | Stefan Monnier | 2013-08-28 14:27:26 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-08-28 14:27:26 -0400 |
| commit | 3ec7babc5c774d9a24dbe68951091eb2bab08e60 (patch) | |
| tree | e97a3e22196912f28e33c03dc49cced0833f72bb /src | |
| parent | 2d69b99e59e81113bf27faa209fb9b060f3244d4 (diff) | |
| download | emacs-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')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/eval.c | 21 |
2 files changed, 17 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7cae8e05f25..9e62a8e08a4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically | ||
| 4 | scoped code (bug#11258). | ||
| 5 | |||
| 1 | 2013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change) | 6 | 2013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change) |
| 2 | 7 | ||
| 3 | * nsterm.m (last_window): New variable. | 8 | * nsterm.m (last_window): New variable. |
| @@ -12,8 +17,8 @@ | |||
| 12 | (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR): | 17 | (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR): |
| 13 | Remove unused macro definitions. | 18 | Remove unused macro definitions. |
| 14 | (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE) | 19 | (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE) |
| 15 | (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA): Only | 20 | (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA): |
| 16 | define if emacs. | 21 | Only define if emacs. |
| 17 | 22 | ||
| 18 | 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru> | 23 | 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru> |
| 19 | 24 | ||
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 | ||
| 3169 | void | 3168 | void |
| 3170 | specbind (Lisp_Object symbol, Lisp_Object value) | 3169 | specbind (Lisp_Object symbol, Lisp_Object value) |