Variable: kill-buffer-query-functions
kill-buffer-query-functions is a variable defined in buffer.c.
Value
(process-kill-buffer-query-function)
Documentation
List of functions called with no args to query before killing a buffer.
The buffer being killed will be current while the functions are running.
See kill-buffer.
If any of them returns nil, the buffer is not killed. Functions run by this hook are supposed to not change the current buffer.
This hook is not run for internal or temporary buffers created by
get-buffer-create or generate-new-buffer with argument
INHIBIT-BUFFER-HOOKS non-nil.
Probably introduced at or before Emacs version 19.23.
Source Code
// Defined in /usr/src/emacs/src/buffer.c
DEFVAR_LISP ("kill-buffer-query-functions", Vkill_buffer_query_functions,
doc: /* List of functions called with no args to query before killing a buffer.
The buffer being killed will be current while the functions are running.
See `kill-buffer'.
If any of them returns nil, the buffer is not killed. Functions run by
this hook are supposed to not change the current buffer.
This hook is not run for internal or temporary buffers created by
`get-buffer-create' or `generate-new-buffer' with argument
INHIBIT-BUFFER-HOOKS non-nil. */);