aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2013-01-19 16:49:17 +0800
committerChong Yidong2013-01-19 16:49:17 +0800
commit73c1421878b3ce4ac6fdb2b0133fda7522578a29 (patch)
tree676b95d22b6f567601a20850bcc77946ff8a16b9
parent76e9f7b9a1fbcf3d5087a441ff61ab7a36e624b5 (diff)
downloademacs-73c1421878b3ce4ac6fdb2b0133fda7522578a29.tar.gz
emacs-73c1421878b3ce4ac6fdb2b0133fda7522578a29.zip
* emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid aborting on Fsignal.
Fixes: debbugs:13289
-rw-r--r--src/ChangeLog5
-rw-r--r--src/emacs.c11
2 files changed, 11 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3727e13d580..4bee4fc5ed7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12013-01-19 Chong Yidong <cyd@gnu.org>
2
3 * emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid
4 aborting on Fsignal (Bug#13289).
5
12013-01-19 Eli Zaretskii <eliz@gnu.org> 62013-01-19 Eli Zaretskii <eliz@gnu.org>
2 7
3 * w32.c (acl_set_file): Treat ERROR_ACCESS_DENIED from 8 * w32.c (acl_set_file): Treat ERROR_ACCESS_DENIED from
diff --git a/src/emacs.c b/src/emacs.c
index 6536c3708af..b7888d343f1 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -133,7 +133,7 @@ Lisp_Object Qfile_name_handler_alist;
133 133
134Lisp_Object Qrisky_local_variable; 134Lisp_Object Qrisky_local_variable;
135 135
136Lisp_Object Qkill_emacs; 136Lisp_Object Qkill_emacs, Qkill_emacs_hook;
137 137
138/* If true, Emacs should not attempt to use a window-specific code, 138/* If true, Emacs should not attempt to use a window-specific code,
139 but instead should use the virtual terminal under which it was started. */ 139 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. */)
1841 (Lisp_Object arg) 1841 (Lisp_Object arg)
1842{ 1842{
1843 struct gcpro gcpro1; 1843 struct gcpro gcpro1;
1844 Lisp_Object hook;
1845 int exit_code; 1844 int exit_code;
1846 1845
1847 GCPRO1 (arg); 1846 GCPRO1 (arg);
@@ -1849,9 +1848,10 @@ all of which are called before Emacs is actually killed. */)
1849 if (feof (stdin)) 1848 if (feof (stdin))
1850 arg = Qt; 1849 arg = Qt;
1851 1850
1852 hook = intern ("kill-emacs-hook"); 1851 /* Fsignal calls emacs_abort () if it sees that waiting_for_input is
1853 Frun_hooks (1, &hook); 1852 set. */
1854 1853 waiting_for_input = 0;
1854 Frun_hooks (1, &Qkill_emacs_hook);
1855 UNGCPRO; 1855 UNGCPRO;
1856 1856
1857#ifdef HAVE_X_WINDOWS 1857#ifdef HAVE_X_WINDOWS
@@ -2263,6 +2263,7 @@ syms_of_emacs (void)
2263 DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist"); 2263 DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist");
2264 DEFSYM (Qrisky_local_variable, "risky-local-variable"); 2264 DEFSYM (Qrisky_local_variable, "risky-local-variable");
2265 DEFSYM (Qkill_emacs, "kill-emacs"); 2265 DEFSYM (Qkill_emacs, "kill-emacs");
2266 DEFSYM (Qkill_emacs_hook, "kill-emacs-hook");
2266 2267
2267#ifndef CANNOT_DUMP 2268#ifndef CANNOT_DUMP
2268 defsubr (&Sdump_emacs); 2269 defsubr (&Sdump_emacs);