kill-emacs-hook

kill-emacs-hook is a variable defined in `C source code'.
Its value is

(org-babel-remove-temporary-directory tex-delete-last-temp-files ps-run-cleanup)

  • This variable may be risky if used as a file-local variable.

Documentation:
Hook run when `kill-emacs' is called.
Since `kill-emacs' may be invoked when the terminal is disconnected (or
in other similar situations), functions placed on this hook should not
expect to be able to interact with the user. To ask for confirmation,
see `kill-emacs-query-functions' instead.

Before Emacs 24.1, the hook was not run in batch mode, i.e., if
`noninteractive' was non-nil.