From dbf1837940b090151b389235c1fc3617aef48234 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 6 Mar 2019 14:45:05 +0100 Subject: * lisp/window.el (fit-frame-to-buffer): Make doc-string more accurate. --- lisp/window.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lisp/window.el') diff --git a/lisp/window.el b/lisp/window.el index 4b30609681c..8c04e010678 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8026,10 +8026,13 @@ Return 0 otherwise." (defun fit-frame-to-buffer (&optional frame max-height min-height max-width min-width only) "Adjust size of FRAME to display the contents of its buffer exactly. FRAME can be any live frame and defaults to the selected one. -Fit only if FRAME's root window is live. MAX-HEIGHT, MIN-HEIGHT, -MAX-WIDTH and MIN-WIDTH specify bounds on the new total size of -FRAME's root window. MIN-HEIGHT and MIN-WIDTH default to the values of -`window-min-height' and `window-min-width' respectively. +Fit only if FRAME's root window is live. + +MAX-HEIGHT, MIN-HEIGHT, MAX-WIDTH and MIN-WIDTH specify bounds on +the new total size of FRAME's root window. MIN-HEIGHT and +MIN-WIDTH default to the values of `window-min-height' and +`window-min-width' respectively. These arguments are specified +in the canonical character width and height of FRAME. If the optional argument ONLY is `vertically', resize the frame vertically only. If ONLY is `horizontally', resize the frame -- cgit v1.2.1 From f0be0f1bed9949fab2773d352917a6a610045795 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Mar 2019 12:21:29 +0200 Subject: 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) --- lisp/window.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lisp/window.el') 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." -- cgit v1.2.1 From 60b5c1090d4b378146597418627049ae574856e6 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Fri, 8 Mar 2019 19:04:35 +0100 Subject: Provide more details in doc-string of 'delete-windows-on' (Bug#34749) * lisp/window.el (delete-windows-on): Provide more details in doc-string (Bug#34749). --- lisp/window.el | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'lisp/window.el') diff --git a/lisp/window.el b/lisp/window.el index 907b3d038fc..58e22a2306a 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4706,9 +4706,21 @@ 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." +If a frame's root window shows the buffer specified by +BUFFER-OR-NAME and is dedicated to that buffer and that frame +does not host the active minibuffer window and there is at least +one other frame on that frame's terminal, delete that frame. +Otherwise, do not delete a frame's root window if it shows the +buffer specified by BUFFER-OR-NAME and do not delete any frame's +main window showing that buffer either. Rather, in any such +case, call `switch-to-prev-buffer' to show another buffer in that +window and make sure the window is no more dedicated to its +buffer. + +If the buffer specified by BUFFER-OR-NAME is shown in a +minibuffer window, do nothing for that window. For any window +that does not show that buffer, remove the buffer from that +window's lists of previous and next buffers." (interactive "BDelete windows on (buffer):\nP") (let ((buffer (window-normalize-buffer buffer-or-name)) ;; Handle the "inverted" meaning of the FRAME argument wrt other -- cgit v1.2.1