diff options
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index b76ced79d61..ddf7e703fc2 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2026,6 +2026,18 @@ skip_debugger (Lisp_Object conditions, Lisp_Object data) | |||
| 2026 | return 0; | 2026 | return 0; |
| 2027 | } | 2027 | } |
| 2028 | 2028 | ||
| 2029 | /* Say whether SIGNAL is a `quit' symbol (or inherits from it). */ | ||
| 2030 | bool | ||
| 2031 | signal_quit_p (Lisp_Object signal) | ||
| 2032 | { | ||
| 2033 | Lisp_Object list; | ||
| 2034 | |||
| 2035 | return EQ (signal, Qquit) | ||
| 2036 | || (Fsymbolp (signal) | ||
| 2037 | && CONSP (list = Fget (signal, Qerror_conditions)) | ||
| 2038 | && Fmemq (Qquit, list)); | ||
| 2039 | } | ||
| 2040 | |||
| 2029 | /* Call the debugger if calling it is currently enabled for CONDITIONS. | 2041 | /* Call the debugger if calling it is currently enabled for CONDITIONS. |
| 2030 | SIG and DATA describe the signal. There are two ways to pass them: | 2042 | SIG and DATA describe the signal. There are two ways to pass them: |
| 2031 | = SIG is the error symbol, and DATA is the rest of the data. | 2043 | = SIG is the error symbol, and DATA is the rest of the data. |
| @@ -2044,7 +2056,7 @@ maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) | |||
| 2044 | ! input_blocked_p () | 2056 | ! input_blocked_p () |
| 2045 | && NILP (Vinhibit_debugger) | 2057 | && NILP (Vinhibit_debugger) |
| 2046 | /* Does user want to enter debugger for this kind of error? */ | 2058 | /* Does user want to enter debugger for this kind of error? */ |
| 2047 | && (EQ (sig, Qquit) | 2059 | && (signal_quit_p (sig) |
| 2048 | ? debug_on_quit | 2060 | ? debug_on_quit |
| 2049 | : wants_debugger (Vdebug_on_error, conditions)) | 2061 | : wants_debugger (Vdebug_on_error, conditions)) |
| 2050 | && ! skip_debugger (conditions, combined_data) | 2062 | && ! skip_debugger (conditions, combined_data) |