# HG changeset patch # User Eli Zaretskii # Date 999971439 0 # Node ID 5fb1514f98a59566ec4e525d69cea21d26799774 # Parent 41ede3832703f9ef09b6ebf52987b3fa4d8ab076 (Selecting Windows): Document some-window. diff -r 41ede3832703 -r 5fb1514f98a5 lispref/windows.texi --- a/lispref/windows.texi Sat Sep 08 17:50:08 2001 +0000 +++ b/lispref/windows.texi Sat Sep 08 17:50:39 2001 +0000 @@ -468,6 +468,21 @@ consider. See @code{get-lru-window}, above. @end defun +@cindex window that satisfies a predicate +@cindex conditional selection of windows +@defun get-window-with-predicate predicate &optional minibuf all-frames default +This function returns a window satisfying @var{predicate}. It cycles +through all visible windows using @code{walk-windows} (@pxref{Cyclic +Window Ordering}), calling @var{predicate} on each one one of them +with that window as its argument. The function returns the first +window for which @var{predicate} returns a non-@code{nil} value; if +that never happens, it returns @var{default}. + +The optional arguments @var{minibuf} and @var{all-frames} specify the +set of windows to include in the scan. See the description of +@code{next-window} in @ref{Cyclic Window Ordering}, for details. +@end defun + @node Cyclic Window Ordering @comment node-name, next, previous, up @section Cyclic Ordering of Windows