diff options
| author | Stefan Monnier | 2012-09-11 20:14:50 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-09-11 20:14:50 -0400 |
| commit | 45b82ad0ebedaa1b7094912e218bea1510c33feb (patch) | |
| tree | 278e50931ea92f8f3201fcb855d454f2202b2f66 /src/eval.c | |
| parent | 50f2e553ce21a2901e9f935650018289c11fcc39 (diff) | |
| download | emacs-45b82ad0ebedaa1b7094912e218bea1510c33feb.tar.gz emacs-45b82ad0ebedaa1b7094912e218bea1510c33feb.zip | |
* src/eval.c: Add `inhibit-debugger'.
(Qinhibit_debugger): New symbol.
(call_debugger): Bind it instead of Qdebug_on_error.
(maybe_call_debugger): Test Vinhibit_debugger.
(syms_of_eval): Define inhibit-debugger.
* src/xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
(syms_of_xdisp): Remove inhibit-debug-on-message.
* lisp/emacs-lisp/debug.el (debug): Don't bind debug-on-error since
inhibit-debugger is bound instead.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c index 4f0d6c69a51..8a8a507a1b6 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -69,7 +69,7 @@ Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp; | |||
| 69 | Lisp_Object Qinhibit_quit; | 69 | Lisp_Object Qinhibit_quit; |
| 70 | Lisp_Object Qand_rest; | 70 | Lisp_Object Qand_rest; |
| 71 | static Lisp_Object Qand_optional; | 71 | static Lisp_Object Qand_optional; |
| 72 | static Lisp_Object Qdebug_on_error; | 72 | static Lisp_Object Qinhibit_debugger; |
| 73 | static Lisp_Object Qdeclare; | 73 | static Lisp_Object Qdeclare; |
| 74 | Lisp_Object Qinternal_interpreter_environment, Qclosure; | 74 | Lisp_Object Qinternal_interpreter_environment, Qclosure; |
| 75 | 75 | ||
| @@ -229,7 +229,7 @@ call_debugger (Lisp_Object arg) | |||
| 229 | specbind (intern ("debugger-may-continue"), | 229 | specbind (intern ("debugger-may-continue"), |
| 230 | debug_while_redisplaying ? Qnil : Qt); | 230 | debug_while_redisplaying ? Qnil : Qt); |
| 231 | specbind (Qinhibit_redisplay, Qnil); | 231 | specbind (Qinhibit_redisplay, Qnil); |
| 232 | specbind (Qdebug_on_error, Qnil); | 232 | specbind (Qinhibit_debugger, Qt); |
| 233 | 233 | ||
| 234 | #if 0 /* Binding this prevents execution of Lisp code during | 234 | #if 0 /* Binding this prevents execution of Lisp code during |
| 235 | redisplay, which necessarily leads to display problems. */ | 235 | redisplay, which necessarily leads to display problems. */ |
| @@ -1725,6 +1725,7 @@ maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) | |||
| 1725 | /* Don't try to run the debugger with interrupts blocked. | 1725 | /* Don't try to run the debugger with interrupts blocked. |
| 1726 | The editing loop would return anyway. */ | 1726 | The editing loop would return anyway. */ |
| 1727 | ! INPUT_BLOCKED_P | 1727 | ! INPUT_BLOCKED_P |
| 1728 | && NILP (Vinhibit_debugger) | ||
| 1728 | /* Does user want to enter debugger for this kind of error? */ | 1729 | /* Does user want to enter debugger for this kind of error? */ |
| 1729 | && (EQ (sig, Qquit) | 1730 | && (EQ (sig, Qquit) |
| 1730 | ? debug_on_quit | 1731 | ? debug_on_quit |
| @@ -3467,7 +3468,7 @@ before making `inhibit-quit' nil. */); | |||
| 3467 | 3468 | ||
| 3468 | DEFSYM (Qinhibit_quit, "inhibit-quit"); | 3469 | DEFSYM (Qinhibit_quit, "inhibit-quit"); |
| 3469 | DEFSYM (Qautoload, "autoload"); | 3470 | DEFSYM (Qautoload, "autoload"); |
| 3470 | DEFSYM (Qdebug_on_error, "debug-on-error"); | 3471 | DEFSYM (Qinhibit_debugger, "inhibit-debugger"); |
| 3471 | DEFSYM (Qmacro, "macro"); | 3472 | DEFSYM (Qmacro, "macro"); |
| 3472 | DEFSYM (Qdeclare, "declare"); | 3473 | DEFSYM (Qdeclare, "declare"); |
| 3473 | 3474 | ||
| @@ -3482,6 +3483,12 @@ before making `inhibit-quit' nil. */); | |||
| 3482 | DEFSYM (Qclosure, "closure"); | 3483 | DEFSYM (Qclosure, "closure"); |
| 3483 | DEFSYM (Qdebug, "debug"); | 3484 | DEFSYM (Qdebug, "debug"); |
| 3484 | 3485 | ||
| 3486 | DEFVAR_LISP ("inhibit-debugger", Vinhibit_debugger, | ||
| 3487 | doc: /* Non-nil means never enter the debugger. | ||
| 3488 | Normally set while the debugger is already active, to avoid recursive | ||
| 3489 | invocations. */); | ||
| 3490 | Vinhibit_debugger = Qnil; | ||
| 3491 | |||
| 3485 | DEFVAR_LISP ("debug-on-error", Vdebug_on_error, | 3492 | DEFVAR_LISP ("debug-on-error", Vdebug_on_error, |
| 3486 | doc: /* Non-nil means enter debugger if an error is signaled. | 3493 | doc: /* Non-nil means enter debugger if an error is signaled. |
| 3487 | Does not apply to errors handled by `condition-case' or those | 3494 | Does not apply to errors handled by `condition-case' or those |
| @@ -3491,7 +3498,7 @@ if one of its condition symbols appears in the list. | |||
| 3491 | When you evaluate an expression interactively, this variable | 3498 | When you evaluate an expression interactively, this variable |
| 3492 | is temporarily non-nil if `eval-expression-debug-on-error' is non-nil. | 3499 | is temporarily non-nil if `eval-expression-debug-on-error' is non-nil. |
| 3493 | The command `toggle-debug-on-error' toggles this. | 3500 | The command `toggle-debug-on-error' toggles this. |
| 3494 | See also the variable `debug-on-quit'. */); | 3501 | See also the variable `debug-on-quit' and `inhibit-debugger'. */); |
| 3495 | Vdebug_on_error = Qnil; | 3502 | Vdebug_on_error = Qnil; |
| 3496 | 3503 | ||
| 3497 | DEFVAR_LISP ("debug-ignored-errors", Vdebug_ignored_errors, | 3504 | DEFVAR_LISP ("debug-ignored-errors", Vdebug_ignored_errors, |