From 72d890c43e70477d496a9a0ef36a61357dde1023 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 May 2026 13:41:22 +0300 Subject: [PATCH] ; Update the documentation of 'debug' --- doc/lispref/debugging.texi | 8 +++----- etc/NEWS | 5 +++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 8d498608da4..48f3c3f8257 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -638,11 +638,9 @@ debugger, etc.), and fills it with information about the stack of Lisp function calls. It then enters a recursive edit, showing the backtrace buffer in Debugger mode. In batch mode (more generally, when @code{noninteractive} is non-@code{nil}, @pxref{Batch Mode}), -this function shows the Lisp backtrace on the standard error stream, -and then kills Emacs, causing it to exit with a non-zero exit code -(@pxref{Killing Emacs}). Binding -@code{backtrace-on-error-noninteractive} to @code{nil} suppresses the -backtrace in batch mode, see below. +this function shows the Lisp backtrace on the standard error stream. +Binding @code{backtrace-on-error-noninteractive} to @code{nil} +suppresses the backtrace in batch mode, see below. The Debugger mode @kbd{c}, @kbd{d}, @kbd{j}, and @kbd{r} commands exit the recursive edit; then @code{debug} switches back to the previous diff --git a/etc/NEWS b/etc/NEWS index acc156ea80e..95bc966d47d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -4222,6 +4222,11 @@ suggestions. So the 'M-?' command now works without a tags table. And the 'M-.' will show a message describing the several built-in options that will provide an Xref backend when used. ++++ +** Calling 'debug' in batch sessions no longer kills Emacs. +If you want Emacs to exit, your program will now have to call +'kill-emacs' explicitly. + * Lisp Changes in Emacs 31.1