Variable: buffer-list-update-hook
buffer-list-update-hook is a variable defined in buffer.c.
Value
nil
Documentation
Hook run when the buffer list changes.
Functions (implicitly) running this hook are get-buffer-create,
make-indirect-buffer, rename-buffer, kill-buffer, bury-buffer
and select-window. 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.
Functions run by this hook should avoid calling select-window with a
nil NORECORD argument since it may lead to infinite recursion.
Probably introduced at or before Emacs version 28.1.
Source Code
// Defined in /usr/src/emacs/src/buffer.c
DEFVAR_LISP ("buffer-list-update-hook", Vbuffer_list_update_hook,
doc: /* Hook run when the buffer list changes.
Functions (implicitly) running this hook are `get-buffer-create',
`make-indirect-buffer', `rename-buffer', `kill-buffer', `bury-buffer'
and `select-window'. 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.
Functions run by this hook should avoid calling `select-window' with a
nil NORECORD argument since it may lead to infinite recursion. */);