diff options
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/eval.c b/src/eval.c index 28478956e35..b094fc2e663 100644 --- a/src/eval.c +++ b/src/eval.c @@ -29,6 +29,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include "keyboard.h" #include "dispextern.h" #include "buffer.h" +#include "pdumper.h" /* CACHEABLE is ordinarily nothing, except it is 'volatile' if necessary to cajole GCC into not warning incorrectly that a @@ -89,10 +90,6 @@ static EMACS_INT when_entered_debugger; /* FIXME: We should probably get rid of this! */ Lisp_Object Vsignaling_function; -/* If non-nil, Lisp code must not be run since some part of Emacs is in - an inconsistent state. Currently unused. */ -Lisp_Object inhibit_lisp_code; - /* These would ordinarily be static, but they need to be visible to GDB. */ bool backtrace_p (union specbinding *) EXTERNALLY_VISIBLE; Lisp_Object *backtrace_args (union specbinding *) EXTERNALLY_VISIBLE; @@ -235,6 +232,8 @@ backtrace_next (union specbinding *pdl) return pdl; } +static void init_eval_once_for_pdumper (void); + static union specbinding * backtrace_thread_next (struct thread_state *tstate, union specbinding *pdl) { @@ -247,15 +246,20 @@ backtrace_thread_next (struct thread_state *tstate, union specbinding *pdl) void init_eval_once (void) { - enum { size = 50 }; - union specbinding *pdlvec = xmalloc ((size + 1) * sizeof *specpdl); - specpdl_size = size; - specpdl = specpdl_ptr = pdlvec + 1; /* Don't forget to update docs (lispref node "Local Variables"). */ max_specpdl_size = 1300; /* 1000 is not enough for CEDET's c-by.el. */ max_lisp_eval_depth = 800; - Vrun_hooks = Qnil; + pdumper_do_now_and_after_load (init_eval_once_for_pdumper); +} + +static void +init_eval_once_for_pdumper (void) +{ + enum { size = 50 }; + union specbinding *pdlvec = malloc ((size + 1) * sizeof *specpdl); + specpdl_size = size; + specpdl = specpdl_ptr = pdlvec + 1; } /* static struct handler handlerlist_sentinel; */ @@ -2084,7 +2088,7 @@ it defines a macro. */) /* This is to make sure that loadup.el gives a clear picture of what files are preloaded and when. */ - if (! NILP (Vpurify_flag)) + if (will_dump_p () && !will_bootstrap_p ()) error ("Attempt to autoload %s while preparing to dump", SDATA (SYMBOL_NAME (funname))); @@ -4002,7 +4006,7 @@ mark_specpdl (union specbinding *first, union specbinding *ptr) for (pdl = first; pdl != ptr; pdl++) { switch (pdl->kind) - { + { case SPECPDL_UNWIND: mark_object (specpdl_arg (pdl)); break; @@ -4039,7 +4043,7 @@ mark_specpdl (union specbinding *first, union specbinding *ptr) case SPECPDL_UNWIND_PTR: case SPECPDL_UNWIND_INT: - case SPECPDL_UNWIND_VOID: + case SPECPDL_UNWIND_VOID: break; default: @@ -4225,8 +4229,6 @@ alist of active lexical bindings. */); staticpro (&Vsignaling_function); Vsignaling_function = Qnil; - inhibit_lisp_code = Qnil; - DEFSYM (Qcatch_all_memory_full, "catch-all-memory-full"); Funintern (Qcatch_all_memory_full, Qnil); |