From d5b9b1a9132fe3bc8f05356a76a9d2d65d2c1251 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 16 Apr 2022 17:30:32 +0200 Subject: [PATCH] Document project-kill-buffers-display-buffer-list * doc/emacs/maintaining.texi (Project Buffer Commands): Mention project-kill-buffers-display-buffer-list. * lisp/progmodes/project.el (project-kill-buffers): Link to project-kill-buffers-display-buffer-list. --- doc/emacs/maintaining.texi | 5 ++++- etc/NEWS | 1 + lisp/progmodes/project.el | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 7f3e9f45c2e..fc2b2a24e2c 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1834,11 +1834,14 @@ buffers as candidates for completion. @findex project-kill-buffers @vindex project-kill-buffer-conditions +@vindex project-kill-buffers-display-buffer-list When you finish working on the project, you may wish to kill all the buffers that belong to the project, to keep your Emacs session smaller. The command @kbd{C-x p k} (@code{project-kill-buffers}) accomplishes that: it kills all the buffers that belong to the current -project that satisfy any of @code{project-kill-buffer-conditions}. +project that satisfy any of @code{project-kill-buffer-conditions}. If +@code{project-kill-buffers-display-buffer-list} is non-@code{nil}, the +buffers to be killed will be displayed first. @node Switching Projects @subsection Switching Projects diff --git a/etc/NEWS b/etc/NEWS index 1965270db6e..e24a46da45c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -927,6 +927,7 @@ it with new 'term-{faint,italic,slow-blink,fast-blink}' faces. *** 'project-find-file' and 'project-or-external-find-file' now accept a prefix argument which is interpreted to mean "include all files". ++++ *** 'project-kill-buffers' can display the list of buffers to kill. Customize the user option 'project-kill-buffers-display-buffer-list' to enable the display of the buffer list. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index ac6aa0ced24..369c425bb14 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1330,7 +1330,9 @@ identical. Only the buffers that match a condition in `project-kill-buffer-conditions' will be killed. If NO-CONFIRM is non-nil, the command will not ask the user for confirmation. NO-CONFIRM is always nil when the command is invoked -interactively." +interactively. + +Also see the `project-kill-buffers-display-buffer-list' variable." (interactive) (let* ((pr (project-current t)) (bufs (project--buffers-to-kill pr))