Commit 73c14218 authored by Chong Yidong's avatar Chong Yidong

* emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid aborting on Fsignal.

Fixes: debbugs:13289
parent 76e9f7b9
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
......
......@@ -133,7 +133,7 @@ Lisp_Object Qfile_name_handler_alist;
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. */
......@@ -1841,7 +1841,6 @@ all of which are called before Emacs is actually killed. */)
(Lisp_Object arg)
{
struct gcpro gcpro1;
Lisp_Object hook;
int exit_code;
GCPRO1 (arg);
......@@ -1849,9 +1848,10 @@ all of which are called before Emacs is actually killed. */)
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
......@@ -2263,6 +2263,7 @@ syms_of_emacs (void)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment