Function: eshell-kill-buffer-function
eshell-kill-buffer-function is a byte-compiled function defined in
esh-mode.el.gz.
Signature
(eshell-kill-buffer-function)
Documentation
Function added to kill-buffer-hook in Eshell buffers.
This runs the function eshell-kill-processes-on-exit,
and the hook eshell-exit-hook.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-mode.el.gz
;;; User Functions:
(defun eshell-kill-buffer-function ()
"Function added to `kill-buffer-hook' in Eshell buffers.
This runs the function `eshell-kill-processes-on-exit',
and the hook `eshell-exit-hook'."
;; It's fine to run this unconditionally since it can be customized
;; via the `eshell-kill-processes-on-exit' variable.
(and (fboundp 'eshell-query-kill-processes)
(not (memq #'eshell-query-kill-processes eshell-exit-hook))
(eshell-query-kill-processes))
(run-hooks 'eshell-exit-hook))