aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilipp Stephani2021-01-02 15:04:50 +0100
committerPhilipp Stephani2021-01-02 15:04:50 +0100
commit4ac6148ef94fed6863c75e73ad91b565ce60cabe (patch)
tree5da40ec45eea60938cc502b2c92b79b8dfdd7811 /src
parent64f2c96cbe3ba803c4026c976c425771911e29e3 (diff)
downloademacs-4ac6148ef94fed6863c75e73ad91b565ce60cabe.tar.gz
emacs-4ac6148ef94fed6863c75e73ad91b565ce60cabe.zip
Avoid printing stacktraces when it probably wouldn't work anyway.
* src/eval.c (signal_or_quit): Don't try to call the debugger if it's inhibited or we are about to dump or bootstrap. In those cases the debugger probably wouldn't work anyway.
Diffstat (limited to 'src')
-rw-r--r--src/eval.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/eval.c b/src/eval.c
index d0db902217b..706aafdf509 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1731,12 +1731,16 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object data, bool keyboard_quit)
1731 return Qnil; 1731 return Qnil;
1732 } 1732 }
1733 1733
1734 /* If we're in batch mode, print a backtrace unconditionally to help with 1734 /* If we're in batch mode, print a backtrace unconditionally to help
1735 debugging. Make sure to use `debug' unconditionally to not interfere with 1735 with debugging. Make sure to use `debug' unconditionally to not
1736 ERT or other packages that install custom debuggers. */ 1736 interfere with ERT or other packages that install custom
1737 debuggers. Don't try to call the debugger while dumping or
1738 bootstrapping, it wouldn't work anyway. */
1737 if (!debugger_called && !NILP (error_symbol) 1739 if (!debugger_called && !NILP (error_symbol)
1738 && (NILP (clause) || EQ (h->tag_or_ch, Qerror)) && noninteractive 1740 && (NILP (clause) || EQ (h->tag_or_ch, Qerror))
1739 && backtrace_on_error_noninteractive) 1741 && noninteractive && backtrace_on_error_noninteractive
1742 && !will_dump_p () && !will_bootstrap_p ()
1743 && NILP (Vinhibit_debugger))
1740 { 1744 {
1741 ptrdiff_t count = SPECPDL_INDEX (); 1745 ptrdiff_t count = SPECPDL_INDEX ();
1742 specbind (Vdebugger, Qdebug); 1746 specbind (Vdebugger, Qdebug);