Variable: kill-buffer-hook

Hook run when a buffer is killed.
The buffer being killed is current while the hook is running.
See `kill-buffer'.