diff options
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/eval.c b/src/eval.c index 9adfc983ced..63484d40e1b 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -78,16 +78,6 @@ Lisp_Object Vrun_hooks; | |||
| 78 | 78 | ||
| 79 | Lisp_Object Vautoload_queue; | 79 | Lisp_Object Vautoload_queue; |
| 80 | 80 | ||
| 81 | /* When lexical binding is being used, this is non-nil, and contains an | ||
| 82 | alist of lexically-bound variable, or (t), indicating an empty | ||
| 83 | environment. The lisp name of this variable is | ||
| 84 | `internal-interpreter-environment'. Every element of this list | ||
| 85 | can be either a cons (VAR . VAL) specifying a lexical binding, | ||
| 86 | or a single symbol VAR indicating that this variable should use | ||
| 87 | dynamic scoping. */ | ||
| 88 | |||
| 89 | Lisp_Object Vinternal_interpreter_environment; | ||
| 90 | |||
| 91 | /* Current number of specbindings allocated in specpdl. */ | 81 | /* Current number of specbindings allocated in specpdl. */ |
| 92 | 82 | ||
| 93 | EMACS_INT specpdl_size; | 83 | EMACS_INT specpdl_size; |
| @@ -2092,9 +2082,11 @@ then strings and vectors are not accepted. */) | |||
| 2092 | if (!CONSP (fun)) | 2082 | if (!CONSP (fun)) |
| 2093 | return Qnil; | 2083 | return Qnil; |
| 2094 | funcar = XCAR (fun); | 2084 | funcar = XCAR (fun); |
| 2085 | if (EQ (funcar, Qclosure)) | ||
| 2086 | fun = Fcdr (XCDR (fun)), funcar = Fcar (fun); | ||
| 2095 | if (EQ (funcar, Qlambda)) | 2087 | if (EQ (funcar, Qlambda)) |
| 2096 | return !NILP (Fassq (Qinteractive, Fcdr (XCDR (fun)))) ? Qt : if_prop; | 2088 | return !NILP (Fassq (Qinteractive, Fcdr (XCDR (fun)))) ? Qt : if_prop; |
| 2097 | if (EQ (funcar, Qautoload)) | 2089 | else if (EQ (funcar, Qautoload)) |
| 2098 | return !NILP (Fcar (Fcdr (Fcdr (XCDR (fun))))) ? Qt : if_prop; | 2090 | return !NILP (Fcar (Fcdr (Fcdr (XCDR (fun))))) ? Qt : if_prop; |
| 2099 | else | 2091 | else |
| 2100 | return Qnil; | 2092 | return Qnil; |
| @@ -3695,6 +3687,8 @@ mark_backtrace (void) | |||
| 3695 | } | 3687 | } |
| 3696 | } | 3688 | } |
| 3697 | 3689 | ||
| 3690 | EXFUN (Funintern, 2); | ||
| 3691 | |||
| 3698 | void | 3692 | void |
| 3699 | syms_of_eval (void) | 3693 | syms_of_eval (void) |
| 3700 | { | 3694 | { |
| @@ -3840,19 +3834,27 @@ DECL is a list `(declare ...)' containing the declarations. | |||
| 3840 | The value the function returns is not used. */); | 3834 | The value the function returns is not used. */); |
| 3841 | Vmacro_declaration_function = Qnil; | 3835 | Vmacro_declaration_function = Qnil; |
| 3842 | 3836 | ||
| 3837 | /* When lexical binding is being used, | ||
| 3838 | vinternal_interpreter_environment is non-nil, and contains an alist | ||
| 3839 | of lexically-bound variable, or (t), indicating an empty | ||
| 3840 | environment. The lisp name of this variable would be | ||
| 3841 | `internal-interpreter-environment' if it weren't hidden. | ||
| 3842 | Every element of this list can be either a cons (VAR . VAL) | ||
| 3843 | specifying a lexical binding, or a single symbol VAR indicating | ||
| 3844 | that this variable should use dynamic scoping. */ | ||
| 3843 | Qinternal_interpreter_environment | 3845 | Qinternal_interpreter_environment |
| 3844 | = intern_c_string ("internal-interpreter-environment"); | 3846 | = intern_c_string ("internal-interpreter-environment"); |
| 3845 | staticpro (&Qinternal_interpreter_environment); | 3847 | staticpro (&Qinternal_interpreter_environment); |
| 3846 | #if 0 /* Don't export this variable to Elisp, so noone can mess with it | 3848 | DEFVAR_LISP ("internal-interpreter-environment", |
| 3847 | (Just imagine if someone makes it buffer-local). */ | 3849 | Vinternal_interpreter_environment, |
| 3848 | DEFVAR__LISP ("internal-interpreter-environment", | ||
| 3849 | Vinternal_interpreter_environment, | ||
| 3850 | doc: /* If non-nil, the current lexical environment of the lisp interpreter. | 3850 | doc: /* If non-nil, the current lexical environment of the lisp interpreter. |
| 3851 | When lexical binding is not being used, this variable is nil. | 3851 | When lexical binding is not being used, this variable is nil. |
| 3852 | A value of `(t)' indicates an empty environment, otherwise it is an | 3852 | A value of `(t)' indicates an empty environment, otherwise it is an |
| 3853 | alist of active lexical bindings. */); | 3853 | alist of active lexical bindings. */); |
| 3854 | #endif | ||
| 3855 | Vinternal_interpreter_environment = Qnil; | 3854 | Vinternal_interpreter_environment = Qnil; |
| 3855 | /* Don't export this variable to Elisp, so noone can mess with it | ||
| 3856 | (Just imagine if someone makes it buffer-local). */ | ||
| 3857 | Funintern (Qinternal_interpreter_environment, Qnil); | ||
| 3856 | 3858 | ||
| 3857 | Vrun_hooks = intern_c_string ("run-hooks"); | 3859 | Vrun_hooks = intern_c_string ("run-hooks"); |
| 3858 | staticpro (&Vrun_hooks); | 3860 | staticpro (&Vrun_hooks); |