1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

; Fix documentation of a recent commit

* src/window.c (Fcombine_windows, Funcombine_window): Doc fixes.

* doc/lispref/windows.texi (Recombining Windows): Fix markup and
wording.
This commit is contained in:
Eli Zaretskii 2025-10-18 12:26:28 +03:00
parent a779f7e01b
commit 0d8a31423a
2 changed files with 22 additions and 22 deletions

View file

@ -2115,33 +2115,33 @@ windows starting with @var{first} and ending with @var{last} and returns
the new parent window. the new parent window.
This function is useful to operate on several siblings of the same This function is useful to operate on several siblings of the same
parent window as a whole. Consider three sibling windows @var{W1}, parent window as a whole. Consider three sibling windows @var{w1},
@var{W2} and @var{W3} aligned side by side. To make a window below @var{w2} and @var{w3} aligned side by side. To create a window below
@var{W1} and @var{W2} but not below @var{W3}, first combine @var{W1} and @var{w1} and @var{w2} but not below @var{w3}, first combine @var{w1} and
@var{W2} using this function and then split the window it returned. It @var{w2} using this function, and then split the window it returned. You
can be also used to obtain the combined state of @var{W1} and @var{W2} can also call @code{window-state-get} (@pxref{Window Configurations}) on
by running @code{window-state-get} (@pxref{Window Configurations}) on the return value of @code{combine-windows} to obtain the combined state
the return value. of @var{w1} and @var{w2}.
@end defun @end defun
@cindex uncombining windows @cindex uncombining windows
@defun uncombine-window window @defun uncombine-window window
This function uncombines the specified @var{window}. @var{window} This function uncombines the specified @var{window}. @var{window}
should be an internal window whose parent window is an internal window should be an internal window whose parent window is an internal window
of the same type. This means, that @var{window} and its parent should of the same type. This means that @var{window} and its parent should
be either both horizontal or both vertical window combinations. If this be either both horizontal or both vertical window combinations. If this
is the case, it makes the child windows of @var{window} child windows of is the case, the function makes the child windows of @var{window} become
@var{window}'s parent and returns @code{t}. Otherwise, it leaves the child windows of @var{window}'s parent, and returns @code{t}.
current configuration of @var{window}'s frame unchanged and returns Otherwise, it leaves the current configuration of @var{window}'s frame
@code{nil}. unchanged and returns @code{nil}.
This function is useful to undo the effect of @code{combine-windows}. This function is useful to undo the effect of @code{combine-windows}.
For example, to calculate the state of two adjacent windows @var{W1} and For example, to calculate the state of two adjacent windows @var{w1} and
@var{W2}, proceed as follows: Run @code{combine-windows} with @var{W1} @var{w2}, proceed as follows: first, call @code{combine-windows} with @var{w1}
and @var{W2} as arguments and store the result in @var{W}. Then run and @var{w2} as arguments, and store the result in @var{w}. Then call
@code{window-state-get} with the argument @var{W}. Finally, run this @code{window-state-get} with the argument @var{w}. Finally, call
function with @var{W} as its argument to obtain the window configuration @code{uncombine-window} with @var{w} as its argument to obtain the
that existed before running @code{combine-windows}. window configuration that existed before the call to @code{combine-windows}.
@end defun @end defun

View file

@ -5155,7 +5155,7 @@ windows with the same parent window. If neither FIRST has a previous
nor LAST has a next sibling, return that parent window. Otherwise, make nor LAST has a next sibling, return that parent window. Otherwise, make
a new parent window whose first child window becomes FIRST and whose a new parent window whose first child window becomes FIRST and whose
last child window becomes LAST, insert that parent window in the window last child window becomes LAST, insert that parent window in the window
tree in lieu of the windows starting with FIRST and ending with LAST and tree in lieu of the windows starting with FIRST and ending with LAST, and
return the new parent window. */) return the new parent window. */)
(Lisp_Object first, Lisp_Object last) (Lisp_Object first, Lisp_Object last)
{ {
@ -5280,9 +5280,9 @@ DEFUN ("uncombine-window", Funcombine_window, Suncombine_window, 1, 1, 0,
WINDOW should be an internal window whose parent window is an internal WINDOW should be an internal window whose parent window is an internal
window of the same type. This means, that WINDOW and its parent should window of the same type. This means, that WINDOW and its parent should
be either both horizontal or both vertical window combinations. If this be either both horizontal or both vertical window combinations. If this
is the case, make the child windows of WINDOW child windows of WINDOW's is the case, make the child windows of WINDOW become child windows of
parent and return t. Otherwise, leave the current configuration of WINDOW's parent and return t. Otherwise, leave the current configuration
WINDOW's frame unchanged and return nil. */) of WINDOW's frame unchanged and return nil. */)
(Lisp_Object window) (Lisp_Object window)
{ {
struct window *w = decode_valid_window (window); struct window *w = decode_valid_window (window);