* emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid aborting on Fsignal.
Fixes: debbugs:13289
This commit is contained in:
parent
76e9f7b9a1
commit
73c1421878
2 changed files with 11 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
11
src/emacs.c
11
src/emacs.c
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue