summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 104ba671253..df698ee8309 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -63,6 +63,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Command line args from shell, as list of strings */
Lisp_Object Vcommand_line_args;
+/* Hook run by `kill-emacs' before it does really anything. */
+Lisp_Object Vkill_emacs_hook;
+
/* Set nonzero after Emacs has started up the first time.
Prevents reinitialization of the Lisp world and keymaps
on subsequent starts. */
@@ -761,4 +764,9 @@ syms_of_emacs ()
DEFVAR_BOOL ("noninteractive", &noninteractive1,
"Non-nil means Emacs is running without interactive terminal.");
+
+ Vkill_emacs_hook = Qnil;
+
+ DEFVAR_LISP ("kill-emacs-hook", &Vkill_emacs_hook,
+ "Hook to be run whenever kill-emacs is called.");
}