aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/eval.c b/src/eval.c
index 6cca13a8fda..e47478bb1f1 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -117,12 +117,6 @@ static EMACS_INT when_entered_debugger;
117 117
118Lisp_Object Vsignaling_function; 118Lisp_Object Vsignaling_function;
119 119
120/* Set to non-zero while processing X events. Checked in Feval to
121 make sure the Lisp interpreter isn't called from a signal handler,
122 which is unsafe because the interpreter isn't reentrant. */
123
124int handling_signal;
125
126/* If non-nil, Lisp code must not be run since some part of Emacs is 120/* If non-nil, Lisp code must not be run since some part of Emacs is
127 in an inconsistent state. Currently, x-create-frame uses this to 121 in an inconsistent state. Currently, x-create-frame uses this to
128 avoid triggering window-configuration-change-hook while the new 122 avoid triggering window-configuration-change-hook while the new
@@ -1106,7 +1100,6 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value)
1106 /* Restore certain special C variables. */ 1100 /* Restore certain special C variables. */
1107 set_poll_suppress_count (catch->poll_suppress_count); 1101 set_poll_suppress_count (catch->poll_suppress_count);
1108 UNBLOCK_INPUT_TO (catch->interrupt_input_blocked); 1102 UNBLOCK_INPUT_TO (catch->interrupt_input_blocked);
1109 handling_signal = 0;
1110 immediate_quit = 0; 1103 immediate_quit = 0;
1111 1104
1112 do 1105 do
@@ -1486,7 +1479,7 @@ See also the function `condition-case'. */)
1486 struct handler *h; 1479 struct handler *h;
1487 struct backtrace *bp; 1480 struct backtrace *bp;
1488 1481
1489 immediate_quit = handling_signal = 0; 1482 immediate_quit = 0;
1490 abort_on_gc = 0; 1483 abort_on_gc = 0;
1491 if (gc_in_progress || waiting_for_input) 1484 if (gc_in_progress || waiting_for_input)
1492 emacs_abort (); 1485 emacs_abort ();
@@ -2039,9 +2032,6 @@ eval_sub (Lisp_Object form)
2039 struct backtrace backtrace; 2032 struct backtrace backtrace;
2040 struct gcpro gcpro1, gcpro2, gcpro3; 2033 struct gcpro gcpro1, gcpro2, gcpro3;
2041 2034
2042 if (handling_signal)
2043 emacs_abort ();
2044
2045 if (SYMBOLP (form)) 2035 if (SYMBOLP (form))
2046 { 2036 {
2047 /* Look up its binding in the lexical environment. 2037 /* Look up its binding in the lexical environment.
@@ -2409,6 +2399,7 @@ If it is a list of functions, those functions are called, in order,
2409with the given arguments ARGS, until one of them 2399with the given arguments ARGS, until one of them
2410returns a non-nil value. Then we return that value. 2400returns a non-nil value. Then we return that value.
2411However, if they all return nil, we return nil. 2401However, if they all return nil, we return nil.
2402If the value of HOOK is nil, this function returns nil.
2412 2403
2413Do not use `make-local-variable' to make a hook variable buffer-local. 2404Do not use `make-local-variable' to make a hook variable buffer-local.
2414Instead, use `add-hook' and specify t for the LOCAL argument. 2405Instead, use `add-hook' and specify t for the LOCAL argument.
@@ -2430,10 +2421,12 @@ DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure,
2430HOOK should be a symbol, a hook variable. If HOOK has a non-nil 2421HOOK should be a symbol, a hook variable. If HOOK has a non-nil
2431value, that value may be a function or a list of functions to be 2422value, that value may be a function or a list of functions to be
2432called to run the hook. If the value is a function, it is called with 2423called to run the hook. If the value is a function, it is called with
2433the given arguments and its return value is returned. 2424the given arguments. Then we return nil if the function returns nil,
2425and t if it returns non-nil.
2434If it is a list of functions, those functions are called, in order, 2426If it is a list of functions, those functions are called, in order,
2435with the given arguments ARGS, until one of them returns nil. 2427with the given arguments ARGS, until one of them returns nil.
2436Then we return nil. However, if they all return non-nil, we return non-nil. 2428Then we return nil. However, if they all return non-nil, we return t.
2429If the value of HOOK is nil, this function returns t.
2437 2430
2438Do not use `make-local-variable' to make a hook variable buffer-local. 2431Do not use `make-local-variable' to make a hook variable buffer-local.
2439Instead, use `add-hook' and specify t for the LOCAL argument. 2432Instead, use `add-hook' and specify t for the LOCAL argument.
@@ -3104,8 +3097,6 @@ specbind (Lisp_Object symbol, Lisp_Object value)
3104{ 3097{
3105 struct Lisp_Symbol *sym; 3098 struct Lisp_Symbol *sym;
3106 3099
3107 eassert (!handling_signal);
3108
3109 CHECK_SYMBOL (symbol); 3100 CHECK_SYMBOL (symbol);
3110 sym = XSYMBOL (symbol); 3101 sym = XSYMBOL (symbol);
3111 if (specpdl_ptr == specpdl + specpdl_size) 3102 if (specpdl_ptr == specpdl + specpdl_size)
@@ -3199,8 +3190,6 @@ specbind (Lisp_Object symbol, Lisp_Object value)
3199void 3190void
3200record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg) 3191record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg)
3201{ 3192{
3202 eassert (!handling_signal);
3203
3204 if (specpdl_ptr == specpdl + specpdl_size) 3193 if (specpdl_ptr == specpdl + specpdl_size)
3205 grow_specpdl (); 3194 grow_specpdl ();
3206 specpdl_ptr->func = function; 3195 specpdl_ptr->func = function;