[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 59657c4: Document 'window-at-side-p' in the Elisp
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] emacs-26 59657c4: Document 'window-at-side-p' in the Elisp manual |
Date: |
Wed, 31 Jan 2018 03:36:41 -0500 (EST) |
branch: emacs-26
commit 59657c482d9c6a32821353be81d19ed6149557d9
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>
Document 'window-at-side-p' in the Elisp manual
* doc/lispref/windows.texi (Windows and Frames): Document
'window-at-side-p'.
---
doc/lispref/windows.texi | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 3691a2c..5ab6d6e 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -338,8 +338,8 @@ The functions @code{window-next-sibling} and
and previous window, respectively, in the cyclic ordering of windows
(@pxref{Cyclic Window Ordering}).
- You can use the following functions to find the first live window on a
-frame and the window nearest to a given window.
+ The following functions can be useful to locate a window within its
+frame.
@defun frame-first-window &optional frame-or-window
This function returns the live window at the upper left corner of the
@@ -351,6 +351,20 @@ the assumption that the frame from our canonical example
is selected
@code{(frame-first-window)} returns @var{W2}.
@end defun
address@hidden window-at-side-p &optional window side
+This function returns @code{t} if @var{window} is located at
address@hidden of its containing frame. The argument @var{window} must be
+a valid window and defaults to the selected one. The argument
address@hidden can be any of the symbols @code{left}, @code{top},
address@hidden or @code{bottom}. The default value @code{nil} is
+handled like @code{bottom}.
+
+Note that this function disregards the minibuffer window
+(@pxref{Minibuffer Windows}). Hence, with @var{side} equal to
address@hidden it may return @code{t} also when the minibuffer window
+appears right below @var{window}.
address@hidden defun
+
@cindex window in direction
@defun window-in-direction direction &optional window ignore sign wrap mini
This function returns the nearest live window in direction
@@ -385,7 +399,12 @@ the minibuffer window if and only if it is currently
active. If
window even when it's not active. However, if @var{wrap} is
address@hidden, it always acts as if @var{mini} were @code{nil}.
-If it doesn't find a suitable window, this function returns @code{nil}.
+If it doesn't find a suitable window, this function returns
address@hidden
+
+Don't use this function to check whether there is @emph{no} window in
address@hidden Calling @code{window-at-side-p} described above is a
+much more efficient way to do that.
@end defun
The following function allows the entire window tree of a frame to be
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 59657c4: Document 'window-at-side-p' in the Elisp manual,
Martin Rudalics <=