diff options
| author | Eli Zaretskii | 2024-07-06 13:44:57 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2024-07-06 13:44:57 +0300 |
| commit | de3fa00a6140b19e6d62a47be721b5ca9b58438b (patch) | |
| tree | f5362a1824ee7a84d3ffe6896bcc20fbee647224 | |
| parent | c986387c79fbae8a99352cad0113bec0b5cb11a5 (diff) | |
| download | emacs-de3fa00a6140b19e6d62a47be721b5ca9b58438b.tar.gz emacs-de3fa00a6140b19e6d62a47be721b5ca9b58438b.zip | |
Fix documentation of 'balance-windows'
* lisp/window.el (balance-windows): Doc fix.
* doc/emacs/windows.texi (Change Window): Make the description of
'balance-windows' more accurate. (Bug#71915)
| -rw-r--r-- | doc/emacs/windows.texi | 10 | ||||
| -rw-r--r-- | lisp/window.el | 11 |
2 files changed, 13 insertions, 8 deletions
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index 5ad6850fed9..60599d42020 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi | |||
| @@ -300,7 +300,8 @@ Make selected window narrower (@code{shrink-window-horizontally}). | |||
| 300 | Shrink this window if its buffer doesn't need so many lines | 300 | Shrink this window if its buffer doesn't need so many lines |
| 301 | (@code{shrink-window-if-larger-than-buffer}). | 301 | (@code{shrink-window-if-larger-than-buffer}). |
| 302 | @item C-x + | 302 | @item C-x + |
| 303 | Make all windows the same height (@code{balance-windows}). | 303 | Balance the sizes of all the windows of the selected frame |
| 304 | (@code{balance-windows}). | ||
| 304 | @end table | 305 | @end table |
| 305 | 306 | ||
| 306 | @kindex C-x 0 | 307 | @kindex C-x 0 |
| @@ -373,8 +374,11 @@ lines to other windows in the frame. | |||
| 373 | 374 | ||
| 374 | @kindex C-x + | 375 | @kindex C-x + |
| 375 | @findex balance-windows | 376 | @findex balance-windows |
| 376 | You can also use @kbd{C-x +} (@code{balance-windows}) to even out the | 377 | You can also use @kbd{C-x +} (@code{balance-windows}) to balance the |
| 377 | heights of all the windows in the selected frame. | 378 | sizes of all the windows of the selected frame (with the exception of |
| 379 | the minibuffer window, @pxref{Minibuffer}). This command makes each | ||
| 380 | horizontal pair of adjacent windows the same height, and each vertical | ||
| 381 | pair of adjacent windows the same width. | ||
| 378 | 382 | ||
| 379 | @node Displaying Buffers | 383 | @node Displaying Buffers |
| 380 | @section Displaying a Buffer in a Window | 384 | @section Displaying a Buffer in a Window |
diff --git a/lisp/window.el b/lisp/window.el index 0dc9421fde7..60040f18bc7 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -5888,12 +5888,13 @@ is non-nil)." | |||
| 5888 | (setq sub (window-right sub)))))))) | 5888 | (setq sub (window-right sub)))))))) |
| 5889 | 5889 | ||
| 5890 | (defun balance-windows (&optional window-or-frame) | 5890 | (defun balance-windows (&optional window-or-frame) |
| 5891 | "Balance the sizes of windows of WINDOW-OR-FRAME. | 5891 | "Balance the sizes of windows shown on the selected frame. |
| 5892 | WINDOW-OR-FRAME is optional and defaults to the selected frame. | 5892 | When called from Lisp, WINDOW-OR-FRAME is optional and defaults to the |
| 5893 | selected frame. | ||
| 5893 | If WINDOW-OR-FRAME denotes a frame, balance the sizes of all | 5894 | If WINDOW-OR-FRAME denotes a frame, balance the sizes of all |
| 5894 | windows of that frame. If WINDOW-OR-FRAME denotes a window, | 5895 | windows of that frame's root window (which excludes the mini-window). |
| 5895 | recursively balance the sizes of all child windows of that | 5896 | If WINDOW-OR-FRAME denotes a window, recursively balance the sizes |
| 5896 | window." | 5897 | of all child windows of that window." |
| 5897 | (interactive) | 5898 | (interactive) |
| 5898 | (let* ((window | 5899 | (let* ((window |
| 5899 | (cond | 5900 | (cond |