aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPaul Eggert2016-07-24 11:10:09 +0200
committerPaul Eggert2016-07-25 00:38:34 +0200
commit50cc08bf6e6cdc96dcdcbef388cf9cf76a15f81a (patch)
tree9cfd5f799262e0ba85d7213113bdb20302196e74 /src/lisp.h
parent2c2b0cd07c143e33af9f7237ef4819c28764a90f (diff)
downloademacs-50cc08bf6e6cdc96dcdcbef388cf9cf76a15f81a.tar.gz
emacs-50cc08bf6e6cdc96dcdcbef388cf9cf76a15f81a.zip
‘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.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 39877d7bb4d..089f3977cd2 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3879,7 +3879,12 @@ extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object);
3879extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args, 3879extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args,
3880 Lisp_Object (*funcall) 3880 Lisp_Object (*funcall)
3881 (ptrdiff_t nargs, Lisp_Object *args)); 3881 (ptrdiff_t nargs, Lisp_Object *args));
3882extern _Noreturn void xsignal (Lisp_Object, Lisp_Object); 3882extern Lisp_Object quit (void);
3883INLINE _Noreturn void
3884xsignal (Lisp_Object error_symbol, Lisp_Object data)
3885{
3886 Fsignal (error_symbol, data);
3887}
3883extern _Noreturn void xsignal0 (Lisp_Object); 3888extern _Noreturn void xsignal0 (Lisp_Object);
3884extern _Noreturn void xsignal1 (Lisp_Object, Lisp_Object); 3889extern _Noreturn void xsignal1 (Lisp_Object, Lisp_Object);
3885extern _Noreturn void xsignal2 (Lisp_Object, Lisp_Object, Lisp_Object); 3890extern _Noreturn void xsignal2 (Lisp_Object, Lisp_Object, Lisp_Object);