[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8b1693f: Make previous Fkill_emacs change safer
From: |
Lars Ingebrigtsen |
Subject: |
master 8b1693f: Make previous Fkill_emacs change safer |
Date: |
Mon, 7 Dec 2020 11:26:59 -0500 (EST) |
branch: master
commit 8b1693f689bff0ccacdd3ec8326a0860b8bc604e
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make previous Fkill_emacs change safer
* src/emacs.c (Fkill_emacs): Don't run `kill-emacs-hook' if it's nil.
---
src/emacs.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/emacs.c b/src/emacs.c
index fe09c44..2a32083 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2365,10 +2365,13 @@ all of which are called before Emacs is actually
killed. */
/* Fsignal calls emacs_abort () if it sees that waiting_for_input is
set. */
waiting_for_input = 0;
- if (noninteractive)
- safe_run_hooks (Qkill_emacs_hook);
- else
- call1 (Qrun_hook_query_error_with_timeout, Qkill_emacs_hook);
+ if (!NILP (find_symbol_value (Qkill_emacs_hook)))
+ {
+ if (noninteractive)
+ safe_run_hooks (Qkill_emacs_hook);
+ else
+ call1 (Qrun_hook_query_error_with_timeout, Qkill_emacs_hook);
+ }
#ifdef HAVE_X_WINDOWS
/* Transfer any clipboards we own to the clipboard manager. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8b1693f: Make previous Fkill_emacs change safer,
Lars Ingebrigtsen <=