summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2019-03-08 19:10:27 +0100
committerMartin Rudalics <rudalics@gmx.at>2019-03-08 19:10:27 +0100
commit464ee80eac364e5febca88a7ded46cdd9c3a4f10 (patch)
tree8873655aa7c4b7ac012ae05aae0310327c75be0d /src/buffer.c
parent60b5c1090d4b378146597418627049ae574856e6 (diff)
downloademacs-464ee80eac364e5febca88a7ded46cdd9c3a4f10.tar.gz
Warn against recursive invocations of 'buffer-list-update-hook' (Bug#34765)
* src/buffer.c (Vbuffer_list_update_hook): * doc/lispref/buffers.texi (Buffer List): Warn against recursive invocations of 'buffer-list-update-hook' (Bug#34765).
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 4ab5d4efe30..12620f0d4aa 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -6236,9 +6236,11 @@ The function `kill-all-local-variables' runs this before doing anything else. *
DEFVAR_LISP ("buffer-list-update-hook", Vbuffer_list_update_hook,
doc: /* Hook run when the buffer list changes.
-Functions running this hook are, `get-buffer-create',
-`make-indirect-buffer', `rename-buffer', `kill-buffer',
-`bury-buffer-internal' and `select-window'. */);
+Functions (implicitly) running this hook are `get-buffer-create',
+`make-indirect-buffer', `rename-buffer', `kill-buffer', `bury-buffer'
+and `select-window'. Functions run by this hook should avoid calling
+`select-window' with a nil NORECORD argument or `with-temp-buffer'
+since either may lead to infinite recursion. */);
Vbuffer_list_update_hook = Qnil;
DEFSYM (Qbuffer_list_update_hook, "buffer-list-update-hook");