aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2006-09-20 10:14:19 +0000
committerKim F. Storm2006-09-20 10:14:19 +0000
commit31ce440599a00b660e900a32efa298811b0b2521 (patch)
treee7f03bc1a3ebe223aa2d81b9d118aeadbeb11ff5
parentb6c146b239b022aba5e2cbda7334a5486799cc9b (diff)
downloademacs-31ce440599a00b660e900a32efa298811b0b2521.tar.gz
emacs-31ce440599a00b660e900a32efa298811b0b2521.zip
(Window Start): pos-visible-in-window-p allows
specifying t for position to mean "end of window". Add window-line-height.
-rw-r--r--lispref/windows.texi29
1 files changed, 28 insertions, 1 deletions
diff --git a/lispref/windows.texi b/lispref/windows.texi
index cf045bfd5c4..70ddd2c70ba 100644
--- a/lispref/windows.texi
+++ b/lispref/windows.texi
@@ -1355,6 +1355,9 @@ visible unless @var{partially} is non-@code{nil}. The argument
1355@var{position} defaults to the current position of point in 1355@var{position} defaults to the current position of point in
1356@var{window}; @var{window}, to the selected window. 1356@var{window}; @var{window}, to the selected window.
1357 1357
1358If @var{position} is @code{t}, the last visible position in
1359@var{window} is checked.
1360
1358The @code{pos-visible-in-window-p} function considers only vertical 1361The @code{pos-visible-in-window-p} function considers only vertical
1359scrolling. If @var{position} is out of view only because @var{window} 1362scrolling. If @var{position} is out of view only because @var{window}
1360has been scrolled horizontally, @code{pos-visible-in-window-p} returns 1363has been scrolled horizontally, @code{pos-visible-in-window-p} returns
@@ -1368,7 +1371,7 @@ visible, it returns a list of the form @code{(@var{x} @var{y})}, where
1368corner of the window; otherwise it returns an extended list of the 1371corner of the window; otherwise it returns an extended list of the
1369form @code{(@var{x} @var{y} @var{rtop} @var{rbot} @var{rowh} 1372form @code{(@var{x} @var{y} @var{rtop} @var{rbot} @var{rowh}
1370@var{vpos})}, where the @var{rtop} and @var{rbot} specify the number 1373@var{vpos})}, where the @var{rtop} and @var{rbot} specify the number
1371of invisible pixels at the top and bottom of the row at 1374of off-window pixels at the top and bottom of the row at
1372@var{position}, @var{rowh} specifies the visible height of that row, 1375@var{position}, @var{rowh} specifies the visible height of that row,
1373and @var{vpos} specifies the vertical position (zero-based row number) 1376and @var{vpos} specifies the vertical position (zero-based row number)
1374of that row. 1377of that row.
@@ -1385,6 +1388,30 @@ Here is an example:
1385@end example 1388@end example
1386@end defun 1389@end defun
1387 1390
1391@defun window-line-height &optional line window
1392This function returns information about text line @var{line} in @var{window}.
1393If @var{line} is one of @code{header-line} or @code{mode-line},
1394@code{window-line-height} returns information about the corresponding
1395line of the window. Otherwise, @var{line} is a text line number
1396starting from 0. A negative number counts from the end of the window.
1397The argument @var{line} defaults to the current line in @var{window};
1398@var{window}, to the selected window.
1399
1400If the display is not up-to-date, @code{window-line-height} returns
1401@code{nil}. In that case, @code{pos-visible-in-window-p} may be used
1402to obtain related information.
1403
1404If there is no line corresponding to the specified @var{line},
1405@code{window-line-height} returns @code{nil}. Otherwise, it returns
1406a list @code{(@var{height} @var{vpos} @var{ypos} @var{offbot})},
1407where @var{height} is the height in pixels of the visible part of the
1408line, @var{vpos} and @var{ypos} are the vertical position in lines and
1409pixels of the line relative to the top of the first text line, and
1410@var{offbot} is the number of off-window pixels at the bottom of the
1411text line. If there are off-window pixels at the top of the (first)
1412text line, @var{ypos} is negative.
1413@end defun
1414
1388@node Textual Scrolling 1415@node Textual Scrolling
1389@section Textual Scrolling 1416@section Textual Scrolling
1390@cindex textual scrolling 1417@cindex textual scrolling