From f0be0f1bed9949fab2773d352917a6a610045795 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Mar 2019 12:21:29 +0200 Subject: [PATCH] Improve documentation of 'delete-windows-on' * doc/emacs/windows.texi (Change Window): Document 'delete-windows-on'. * lisp/window.el (delete-windows-on): Doc fix. (Bug#34749) --- doc/emacs/windows.texi | 7 +++++++ lisp/window.el | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index 27077ff9ec1..c4c724e6bc2 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi @@ -255,6 +255,8 @@ Delete all windows in the selected frame except the selected window Delete the selected window and kill the buffer that was showing in it (@code{kill-buffer-and-window}). The last character in this key sequence is a zero. +@item M-x delete-windows-on @key{RET} @var{buffer} @key{RET} +Delete windows showing the specified @var{buffer}. @item C-x ^ Make selected window taller (@code{enlarge-window}). @item C-x @} @@ -290,6 +292,11 @@ selected window. whole frame. (This command cannot be used while the minibuffer window is active; attempting to do so signals an error.) + @kbd{M-x delete-windows-on} deletes windows that show a specific +buffer. It prompts for the buffer, defaulting to the current buffer. +With prefix argument of zero, @kbd{C-u 0}, this command deletes +windows only on the current display's frames. + @cindex resize window @cindex resizing windows @kindex C-x ^ diff --git a/lisp/window.el b/lisp/window.el index 8c04e010678..907b3d038fc 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4684,6 +4684,8 @@ displayed there." BUFFER-OR-NAME may be a buffer or the name of an existing buffer and defaults to the current buffer. +Interactively, prompt for the buffer. + The following non-nil values of the optional argument FRAME have special meanings: @@ -4700,6 +4702,10 @@ have special meanings: Any other value of FRAME means consider all windows on all frames. +Interactively, FRAME is the prefix argument, so you can +use \\[universal-argument] 0 to specify all windows only on +the current terminal's frames. + When a window showing BUFFER-OR-NAME is dedicated and the only window of its frame, that frame is deleted when there are other frames left." -- 2.39.2