summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/debug.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2023-11-09 10:33:28 +0200
committerEli Zaretskii <eliz@gnu.org>2023-11-09 10:33:28 +0200
commitfe000236cf278a469adbf27e2184f823f7e12587 (patch)
treedf9a5ee657aeedd185224af56a7d8b42416aa14f /lisp/emacs-lisp/debug.el
parent103ca678ac1a043c9afbb7a419adb7ddf7a624ef (diff)
downloademacs-fe000236cf278a469adbf27e2184f823f7e12587.tar.gz
emacs-fe000236cf278a469adbf27e2184f823f7e12587.tar.bz2
emacs-fe000236cf278a469adbf27e2184f823f7e12587.zip
Improve documentation of signaling errors in batch mode
* doc/lispref/control.texi (Signaling Errors) (Processing of Errors): * doc/lispref/os.texi (Batch Mode): * doc/lispref/debugging.texi (Invoking the Debugger): * lisp/emacs-lisp/debug.el (debug): * src/eval.c (Fsignal): * lisp/subr.el (error): Document more prominently that signaling an unhandled error in batch mode kills Emacs. Better documentation of backtrace in batch mode.
Diffstat (limited to 'lisp/emacs-lisp/debug.el')
-rw-r--r--lisp/emacs-lisp/debug.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index dc23b071f0d..5411088189d 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -158,6 +158,13 @@ where CAUSE can be:
;;;###autoload
(defun debug (&rest args)
"Enter debugger. \\<debugger-mode-map>`\\[debugger-continue]' returns from the debugger.
+
+In interactive sessions, this switches to a backtrace buffer and shows
+the Lisp backtrace of function calls there. In batch mode (more accurately,
+when `noninteractive' is non-nil), it shows the Lisp backtrace on the
+standard error stream (unless `backtrace-on-error-noninteractive' is nil),
+and then kills Emacs, causing it to exit with a negative exit code.
+
Arguments are mainly for use when this is called from the internals
of the evaluator.