+2013-01-19 Chong Yidong <cyd@gnu.org>
+
+ * emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid
+ aborting on Fsignal (Bug#13289).
+
2013-01-19 Eli Zaretskii <eliz@gnu.org>
* w32.c (acl_set_file): Treat ERROR_ACCESS_DENIED from
Lisp_Object Qrisky_local_variable;
-Lisp_Object Qkill_emacs;
+Lisp_Object Qkill_emacs, Qkill_emacs_hook;
/* If true, Emacs should not attempt to use a window-specific code,
but instead should use the virtual terminal under which it was started. */
(Lisp_Object arg)
{
struct gcpro gcpro1;
- Lisp_Object hook;
int exit_code;
GCPRO1 (arg);
if (feof (stdin))
arg = Qt;
- hook = intern ("kill-emacs-hook");
- Frun_hooks (1, &hook);
-
+ /* Fsignal calls emacs_abort () if it sees that waiting_for_input is
+ set. */
+ waiting_for_input = 0;
+ Frun_hooks (1, &Qkill_emacs_hook);
UNGCPRO;
#ifdef HAVE_X_WINDOWS
DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist");
DEFSYM (Qrisky_local_variable, "risky-local-variable");
DEFSYM (Qkill_emacs, "kill-emacs");
+ DEFSYM (Qkill_emacs_hook, "kill-emacs-hook");
#ifndef CANNOT_DUMP
defsubr (&Sdump_emacs);