diff options
| author | Alan Mackenzie | 2022-01-11 21:57:54 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2022-01-11 21:57:54 +0000 |
| commit | 2128cd8c08da84ab40608ac5db0fecfce733cfad (patch) | |
| tree | e295275b1a99aed2e5e0cc270f91614062c670f6 /src/eval.c | |
| parent | 4e77177b063f9da8a48709aa3ef416d0ac21837b (diff) | |
| parent | 18dac472553e6cd1102b644c2175012e12215c18 (diff) | |
| download | emacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.tar.gz emacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.zip | |
Merge branch 'master' into scratch/correct-warning-pos
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/src/eval.c b/src/eval.c index 5cb673ab223..6a8c759c1d9 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Evaluator for GNU Emacs Lisp interpreter. | 1 | /* Evaluator for GNU Emacs Lisp interpreter. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1987, 1993-1995, 1999-2021 Free Software Foundation, | 3 | Copyright (C) 1985-1987, 1993-1995, 1999-2022 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| @@ -220,17 +220,14 @@ void | |||
| 220 | init_eval_once (void) | 220 | init_eval_once (void) |
| 221 | { | 221 | { |
| 222 | /* Don't forget to update docs (lispref node "Local Variables"). */ | 222 | /* Don't forget to update docs (lispref node "Local Variables"). */ |
| 223 | if (!NATIVE_COMP_FLAG) | 223 | #ifndef HAVE_NATIVE_COMP |
| 224 | { | 224 | max_specpdl_size = 1800; /* See bug#46818. */ |
| 225 | max_specpdl_size = 1800; /* See bug#46818. */ | 225 | max_lisp_eval_depth = 800; |
| 226 | max_lisp_eval_depth = 800; | 226 | #else |
| 227 | } | 227 | /* Original values increased for comp.el. */ |
| 228 | else | 228 | max_specpdl_size = 2500; |
| 229 | { | 229 | max_lisp_eval_depth = 1600; |
| 230 | /* Original values increased for comp.el. */ | 230 | #endif |
| 231 | max_specpdl_size = 2500; | ||
| 232 | max_lisp_eval_depth = 1600; | ||
| 233 | } | ||
| 234 | Vrun_hooks = Qnil; | 231 | Vrun_hooks = Qnil; |
| 235 | pdumper_do_now_and_after_load (init_eval_once_for_pdumper); | 232 | pdumper_do_now_and_after_load (init_eval_once_for_pdumper); |
| 236 | } | 233 | } |
| @@ -2610,6 +2607,19 @@ eval_sub (Lisp_Object form) | |||
| 2610 | interpreted using lexical-binding or not. */ | 2607 | interpreted using lexical-binding or not. */ |
| 2611 | specbind (Qlexical_binding, | 2608 | specbind (Qlexical_binding, |
| 2612 | NILP (Vinternal_interpreter_environment) ? Qnil : Qt); | 2609 | NILP (Vinternal_interpreter_environment) ? Qnil : Qt); |
| 2610 | |||
| 2611 | /* Make the macro aware of any defvar declarations in scope. */ | ||
| 2612 | Lisp_Object dynvars = Vmacroexp__dynvars; | ||
| 2613 | for (Lisp_Object p = Vinternal_interpreter_environment; | ||
| 2614 | !NILP (p); p = XCDR(p)) | ||
| 2615 | { | ||
| 2616 | Lisp_Object e = XCAR (p); | ||
| 2617 | if (SYMBOLP (e)) | ||
| 2618 | dynvars = Fcons(e, dynvars); | ||
| 2619 | } | ||
| 2620 | if (!EQ (dynvars, Vmacroexp__dynvars)) | ||
| 2621 | specbind (Qmacroexp__dynvars, dynvars); | ||
| 2622 | |||
| 2613 | exp = apply1 (Fcdr (fun), original_args); | 2623 | exp = apply1 (Fcdr (fun), original_args); |
| 2614 | exp = unbind_to (count1, exp); | 2624 | exp = unbind_to (count1, exp); |
| 2615 | val = eval_sub (exp); | 2625 | val = eval_sub (exp); |
| @@ -3277,11 +3287,13 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, | |||
| 3277 | else if (MODULE_FUNCTIONP (fun)) | 3287 | else if (MODULE_FUNCTIONP (fun)) |
| 3278 | return funcall_module (fun, nargs, arg_vector); | 3288 | return funcall_module (fun, nargs, arg_vector); |
| 3279 | #endif | 3289 | #endif |
| 3290 | #ifdef HAVE_NATIVE_COMP | ||
| 3280 | else if (SUBR_NATIVE_COMPILED_DYNP (fun)) | 3291 | else if (SUBR_NATIVE_COMPILED_DYNP (fun)) |
| 3281 | { | 3292 | { |
| 3282 | syms_left = XSUBR (fun)->lambda_list[0]; | 3293 | syms_left = XSUBR (fun)->lambda_list; |
| 3283 | lexenv = Qnil; | 3294 | lexenv = Qnil; |
| 3284 | } | 3295 | } |
| 3296 | #endif | ||
| 3285 | else | 3297 | else |
| 3286 | emacs_abort (); | 3298 | emacs_abort (); |
| 3287 | 3299 | ||
| @@ -4581,5 +4593,6 @@ alist of active lexical bindings. */); | |||
| 4581 | defsubr (&Sbacktrace_eval); | 4593 | defsubr (&Sbacktrace_eval); |
| 4582 | defsubr (&Sbacktrace__locals); | 4594 | defsubr (&Sbacktrace__locals); |
| 4583 | defsubr (&Sspecial_variable_p); | 4595 | defsubr (&Sspecial_variable_p); |
| 4596 | DEFSYM (Qfunctionp, "functionp"); | ||
| 4584 | defsubr (&Sfunctionp); | 4597 | defsubr (&Sfunctionp); |
| 4585 | } | 4598 | } |