diff options
| author | Richard M. Stallman | 1999-01-11 18:09:31 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1999-01-11 18:09:31 +0000 |
| commit | 9b942ebd481c851895ae2b47c2ad186afea6fa82 (patch) | |
| tree | 18fed3847e3d9ff444132a5cd49b9c9fa93f7b2e /src | |
| parent | 7052680be69dc748f2997576e1fc118f2909bfd9 (diff) | |
| download | emacs-9b942ebd481c851895ae2b47c2ad186afea6fa82.tar.gz emacs-9b942ebd481c851895ae2b47c2ad186afea6fa82.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/eval.c | 17 |
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\ | |||
| 1212 | DATA should be a list. Its elements are printed as part of the error message.\n\ | 1212 | DATA should be a list. Its elements are printed as part of the error message.\n\ |
| 1213 | If the signal is handled, DATA is made available to the handler.\n\ | 1213 | If the signal is handled, DATA is made available to the handler.\n\ |
| 1214 | See also the function `condition-case'.") | 1214 | See also the function `condition-case'.") |
| 1215 | /* When memory is full, ERROR-SYMBOL is nil, | ||
| 1216 | and DATA is (REAL-ERROR-SYMBOL . REAL-DATA). */ | ||
| 1215 | (error_symbol, data) | 1217 | (error_symbol, data) |
| 1216 | Lisp_Object error_symbol, data; | 1218 | Lisp_Object error_symbol, data; |
| 1217 | { | 1219 | { |
| @@ -1361,8 +1363,9 @@ skip_debugger (conditions, data) | |||
| 1361 | 1363 | ||
| 1362 | /* Value of Qlambda means we have called debugger and user has continued. | 1364 | /* Value of Qlambda means we have called debugger and user has continued. |
| 1363 | There are two ways to pass SIG and DATA: | 1365 | There are two ways to pass SIG and DATA: |
| 1364 | - SIG is the error symbol, and DATA is the rest of the data. | 1366 | = SIG is the error symbol, and DATA is the rest of the data. |
| 1365 | = SIG is nil, and DATA is (SYMBOL . REST-OF-DATA). | 1367 | = SIG is nil, and DATA is (SYMBOL . REST-OF-DATA). |
| 1368 | This is for memory-full errors only. | ||
| 1366 | 1369 | ||
| 1367 | Store value returned from debugger into *DEBUGGER_VALUE_PTR. */ | 1370 | Store value returned from debugger into *DEBUGGER_VALUE_PTR. */ |
| 1368 | 1371 | ||
| @@ -1385,11 +1388,16 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr) | |||
| 1385 | int count = specpdl_ptr - specpdl; | 1388 | int count = specpdl_ptr - specpdl; |
| 1386 | int debugger_called = 0; | 1389 | int debugger_called = 0; |
| 1387 | Lisp_Object sig_symbol, combined_data; | 1390 | Lisp_Object sig_symbol, combined_data; |
| 1391 | /* This is set to 1 if we are handling a memory-full error, | ||
| 1392 | because these must not run the debugger. | ||
| 1393 | (There is no room in memory to do that!) */ | ||
| 1394 | int no_debugger = 0; | ||
| 1388 | 1395 | ||
| 1389 | if (NILP (sig)) | 1396 | if (NILP (sig)) |
| 1390 | { | 1397 | { |
| 1391 | combined_data = data; | 1398 | combined_data = data; |
| 1392 | sig_symbol = Fcar (data); | 1399 | sig_symbol = Fcar (data); |
| 1400 | no_debugger = 1; | ||
| 1393 | } | 1401 | } |
| 1394 | else | 1402 | else |
| 1395 | { | 1403 | { |
| @@ -1408,9 +1416,10 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr) | |||
| 1408 | Fbacktrace, Qnil); | 1416 | Fbacktrace, Qnil); |
| 1409 | #endif | 1417 | #endif |
| 1410 | } | 1418 | } |
| 1411 | if ((EQ (sig_symbol, Qquit) | 1419 | if (! no_debugger |
| 1412 | ? debug_on_quit | 1420 | && (EQ (sig_symbol, Qquit) |
| 1413 | : wants_debugger (Vdebug_on_error, conditions)) | 1421 | ? debug_on_quit |
| 1422 | : wants_debugger (Vdebug_on_error, conditions)) | ||
| 1414 | && ! skip_debugger (conditions, combined_data) | 1423 | && ! skip_debugger (conditions, combined_data) |
| 1415 | && when_entered_debugger < num_nonmacro_input_events) | 1424 | && when_entered_debugger < num_nonmacro_input_events) |
| 1416 | { | 1425 | { |