kill-buffer-query-functions

kill-buffer-query-functions is a variable defined in `C source code'.
Its value is
(process-kill-buffer-query-function)

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

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.

If any of them returns nil, the buffer is not killed. Functions run by
this hook are supposed to not change the current buffer.