aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32menu.c
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/w32menu.c
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/w32menu.c')
-rw-r--r--src/w32menu.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/w32menu.c b/src/w32menu.c
index 13296d9d855..7c66360becd 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -827,7 +827,7 @@ w32_menu_show (struct frame *f, int x, int y, int menuflags,
827 { 827 {
828 unblock_input (); 828 unblock_input ();
829 /* Make "Cancel" equivalent to C-g. */ 829 /* Make "Cancel" equivalent to C-g. */
830 Fsignal (Qquit, Qnil); 830 quit ();
831 } 831 }
832 832
833 unblock_input (); 833 unblock_input ();
@@ -1019,7 +1019,7 @@ w32_dialog_show (struct frame *f, Lisp_Object title,
1019 } 1019 }
1020 else 1020 else
1021 /* Make "Cancel" equivalent to C-g. */ 1021 /* Make "Cancel" equivalent to C-g. */
1022 Fsignal (Qquit, Qnil); 1022 quit ();
1023 1023
1024 return Qnil; 1024 return Qnil;
1025} 1025}
@@ -1155,7 +1155,7 @@ simple_dialog_show (struct frame *f, Lisp_Object contents, Lisp_Object header)
1155 else if (answer == IDNO) 1155 else if (answer == IDNO)
1156 lispy_answer = build_string ("No"); 1156 lispy_answer = build_string ("No");
1157 else 1157 else
1158 Fsignal (Qquit, Qnil); 1158 quit ();
1159 1159
1160 for (temp = XCDR (contents); CONSP (temp); temp = XCDR (temp)) 1160 for (temp = XCDR (contents); CONSP (temp); temp = XCDR (temp))
1161 { 1161 {
@@ -1177,8 +1177,7 @@ simple_dialog_show (struct frame *f, Lisp_Object contents, Lisp_Object header)
1177 return value; 1177 return value;
1178 } 1178 }
1179 } 1179 }
1180 Fsignal (Qquit, Qnil); 1180 return quit ();
1181 return Qnil;
1182} 1181}
1183#endif /* !HAVE_DIALOGS */ 1182#endif /* !HAVE_DIALOGS */
1184 1183