1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 19:10:37 -08:00

‘signal’ no longer returns

Although for decades ‘signal’ has been documented to not return,
a corner case in the Lisp debugger causes ‘signal’ to return.
Remove the corner case and adjust Emacs internals accordingly.
An alternative would be to document the corner case, but this
would complicate the Lisp API unnecessarily.  (Bug#24047)
* src/eval.c (signal_or_quit): New function, with most of the
old contents of Fsignal.
(quit): New function, which uses signal_or_quit and which
might return.  All keyboard-based callers of Fsignal (Qquit,
Qnil) changed to use this new function instead.
(Fsignal): Use signal_or_quit.  Now _Noreturn.  All callers
changed.
(xsignal): Move to lisp.h.
* src/lisp.h (xsignal): Now an inline function, as it's now
just an alias for Fsignal.
This commit is contained in:
Paul Eggert 2016-07-24 11:10:09 +02:00
parent 2c2b0cd07c
commit 50cc08bf6e
13 changed files with 54 additions and 39 deletions

View file

@ -386,7 +386,7 @@ relocate_byte_stack (void)
Vquit_flag = Qnil; \
if (EQ (Vthrow_on_input, flag)) \
Fthrow (Vthrow_on_input, Qt); \
Fsignal (Qquit, Qnil); \
quit (); \
} \
else if (pending_signals) \
process_pending_signals (); \