comparison lispref/windows.texi @ 34390:7d0d54bf89f4

(Window Start): Update documentation for `pos-visible-in-window-p'.
author Miles Bader <miles@gnu.org>
date Sat, 09 Dec 2000 02:58:35 +0000
parents 91a288b94484
children 3a0a4c2b6633
comparison
equal deleted inserted replaced
34389:779f5314f5fa 34390:7d0d54bf89f4
1209 If @var{noforce} is non-@code{nil}, and @var{position} would place point 1209 If @var{noforce} is non-@code{nil}, and @var{position} would place point
1210 off screen at the next redisplay, then redisplay computes a new window-start 1210 off screen at the next redisplay, then redisplay computes a new window-start
1211 position that works well with point, and thus @var{position} is not used. 1211 position that works well with point, and thus @var{position} is not used.
1212 @end defun 1212 @end defun
1213 1213
1214 @defun pos-visible-in-window-p &optional position window fully 1214 @defun pos-visible-in-window-p &optional position window partially
1215 This function returns @code{t} if @var{position} is within the range of 1215 This function returns @code{t} if @var{position} is within the range of
1216 text currently visible on the screen in @var{window}. If @var{fully} is 1216 text currently visible on the screen in @var{window}. It returns
1217 non-@code{nil}, then locations that are partially obscured are not 1217 @code{nil} if @var{position} is scrolled vertically or horizontally out
1218 considered visible. It returns @code{nil} if @var{position} is scrolled 1218 of view. Locations that are partially obscured are not considered
1219 vertically out of view. The argument @var{position} defaults to the 1219 visible unless @var{partially} is non-@code{nil}. The argument
1220 current position of point; @var{window}, to the selected window. Here 1220 @var{position} defaults to the current position of point in
1221 is an example: 1221 @var{window}; @var{window}, to the selected window.
1222
1223 Here is an example:
1222 1224
1223 @example 1225 @example
1224 @group 1226 @group
1225 (or (pos-visible-in-window-p 1227 (or (pos-visible-in-window-p
1226 (point) (selected-window)) 1228 (point) (selected-window))
1227 (recenter 0)) 1229 (recenter 0))
1228 @end group 1230 @end group
1229 @end example 1231 @end example
1230
1231 The @code{pos-visible-in-window-p} function considers only vertical
1232 scrolling. If @var{position} is out of view only because @var{window}
1233 has been scrolled horizontally, @code{pos-visible-in-window-p} returns
1234 @code{t} anyway. @xref{Horizontal Scrolling}.
1235 @end defun 1232 @end defun
1236 1233
1237 @node Textual Scrolling 1234 @node Textual Scrolling
1238 @section Textual Scrolling 1235 @section Textual Scrolling
1239 @cindex textual scrolling 1236 @cindex textual scrolling