summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1999-01-11 18:09:31 +0000
committerRichard M. Stallman <rms@gnu.org>1999-01-11 18:09:31 +0000
commit9b942ebd481c851895ae2b47c2ad186afea6fa82 (patch)
tree18fed3847e3d9ff444132a5cd49b9c9fa93f7b2e
parent7052680be69dc748f2997576e1fc118f2909bfd9 (diff)
downloademacs-9b942ebd481c851895ae2b47c2ad186afea6fa82.tar.gz
(find_handler_clause): If SIG is nil (memory full error),
never run the debugger, and don't bother checking the args to see whether the debugger should be run.
-rw-r--r--src/eval.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c
index a933e05d4b9..60672553f15 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1212,6 +1212,8 @@ The symbol `error' should normally be one of them.\n\
DATA should be a list. Its elements are printed as part of the error message.\n\
If the signal is handled, DATA is made available to the handler.\n\
See also the function `condition-case'.")
+ /* When memory is full, ERROR-SYMBOL is nil,
+ and DATA is (REAL-ERROR-SYMBOL . REAL-DATA). */
(error_symbol, data)
Lisp_Object error_symbol, data;
{
@@ -1361,8 +1363,9 @@ skip_debugger (conditions, data)
/* Value of Qlambda means we have called debugger and user has continued.
There are two ways to pass SIG and DATA:
- - SIG is the error symbol, and DATA is the rest of the data.
+ = SIG is the error symbol, and DATA is the rest of the data.
= SIG is nil, and DATA is (SYMBOL . REST-OF-DATA).
+ This is for memory-full errors only.
Store value returned from debugger into *DEBUGGER_VALUE_PTR. */
@@ -1385,11 +1388,16 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr)
int count = specpdl_ptr - specpdl;
int debugger_called = 0;
Lisp_Object sig_symbol, combined_data;
+ /* This is set to 1 if we are handling a memory-full error,
+ because these must not run the debugger.
+ (There is no room in memory to do that!) */
+ int no_debugger = 0;
if (NILP (sig))
{
combined_data = data;
sig_symbol = Fcar (data);
+ no_debugger = 1;
}
else
{
@@ -1408,9 +1416,10 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr)
Fbacktrace, Qnil);
#endif
}
- if ((EQ (sig_symbol, Qquit)
- ? debug_on_quit
- : wants_debugger (Vdebug_on_error, conditions))
+ if (! no_debugger
+ && (EQ (sig_symbol, Qquit)
+ ? debug_on_quit
+ : wants_debugger (Vdebug_on_error, conditions))
&& ! skip_debugger (conditions, combined_data)
&& when_entered_debugger < num_nonmacro_input_events)
{