diff options
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/eval.c b/src/eval.c index 566be0c2a83..6e964f6604b 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2033,7 +2033,9 @@ it is defines a macro. */) | |||
| 2033 | 2033 | ||
| 2034 | DEFUN ("eval", Feval, Seval, 1, 2, 0, | 2034 | DEFUN ("eval", Feval, Seval, 1, 2, 0, |
| 2035 | doc: /* Evaluate FORM and return its value. | 2035 | doc: /* Evaluate FORM and return its value. |
| 2036 | If LEXICAL is t, evaluate using lexical scoping. */) | 2036 | If LEXICAL is t, evaluate using lexical scoping. |
| 2037 | LEXICAL can also be an actual lexical environment, in the form of an | ||
| 2038 | alist mapping symbols to their value. */) | ||
| 2037 | (Lisp_Object form, Lisp_Object lexical) | 2039 | (Lisp_Object form, Lisp_Object lexical) |
| 2038 | { | 2040 | { |
| 2039 | ptrdiff_t count = SPECPDL_INDEX (); | 2041 | ptrdiff_t count = SPECPDL_INDEX (); |
| @@ -2146,8 +2148,9 @@ eval_sub (Lisp_Object form) | |||
| 2146 | 2148 | ||
| 2147 | /* Optimize for no indirection. */ | 2149 | /* Optimize for no indirection. */ |
| 2148 | fun = original_fun; | 2150 | fun = original_fun; |
| 2149 | if (SYMBOLP (fun) && !NILP (fun) | 2151 | if (!SYMBOLP (fun)) |
| 2150 | && (fun = XSYMBOL (fun)->function, SYMBOLP (fun))) | 2152 | fun = Ffunction (Fcons (fun, Qnil)); |
| 2153 | else if (!NILP (fun) && (fun = XSYMBOL (fun)->function, SYMBOLP (fun))) | ||
| 2151 | fun = indirect_function (fun); | 2154 | fun = indirect_function (fun); |
| 2152 | 2155 | ||
| 2153 | if (SUBRP (fun)) | 2156 | if (SUBRP (fun)) |
| @@ -3151,20 +3154,17 @@ let_shadows_global_binding_p (Lisp_Object symbol) | |||
| 3151 | return 0; | 3154 | return 0; |
| 3152 | } | 3155 | } |
| 3153 | 3156 | ||
| 3154 | /* `specpdl_ptr->symbol' is a field which describes which variable is | 3157 | /* `specpdl_ptr' describes which variable is |
| 3155 | let-bound, so it can be properly undone when we unbind_to. | 3158 | let-bound, so it can be properly undone when we unbind_to. |
| 3156 | It can have the following two shapes: | 3159 | 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 | 3160 | - 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 | 3161 | aliased (i.e. when let-binding V1 that's aliased to V2, we want |
| 3161 | to record V2 here). | 3162 | to record V2 here). |
| 3162 | - (SYMBOL WHERE . BUFFER) : this means that it is a let-binding for | 3163 | - WHERE tells us in which buffer the binding took place. |
| 3163 | variable SYMBOL which can be buffer-local. WHERE tells us | 3164 | 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 | 3165 | buffer-local variable) as well as for SPECPDL_LET_DEFAULT bindings, |
| 3165 | global value of the variable) and BUFFER tells us which buffer was | 3166 | 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 | 3167 | buffer-local. */ |
| 3167 | BUFFER did not yet have a buffer-local value). */ | ||
| 3168 | 3168 | ||
| 3169 | void | 3169 | void |
| 3170 | specbind (Lisp_Object symbol, Lisp_Object value) | 3170 | specbind (Lisp_Object symbol, Lisp_Object value) |