From: Eli Zaretskii Date: Wed, 30 Sep 2015 09:46:17 +0000 (+0300) Subject: ; Clarify docs of pos-visible-in-window-p some more X-Git-Tag: emacs-25.0.90~1223^2~57 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1c6a58705b653b62c71266497564b1880c5b1340;p=emacs.git ; Clarify docs of pos-visible-in-window-p some more --- diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 881d364232a..1da2d1cfe7b 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -3174,12 +3174,14 @@ position that works well with point, and thus @var{position} is not used. @defun pos-visible-in-window-p &optional position window partially This function returns non-@code{nil} if @var{position} is within the range of text currently visible on the screen in @var{window}. It -returns @code{nil} if @var{position} is scrolled vertically out of view. -Locations that are partially obscured are not considered visible unless -@var{partially} is non-@code{nil}. The argument @var{position} defaults -to the current position of point in @var{window}; @var{window}, to the -selected window. If @var{position} is @code{t}, that means to check the -first visible position of the last visible screen line in @var{window}. +returns @code{nil} if @var{position} is scrolled vertically out of +view. Locations that are partially obscured are not considered +visible unless @var{partially} is non-@code{nil}. The argument +@var{position} defaults to the current position of point in +@var{window}; @var{window} defaults to the selected window. If +@var{position} is @code{t}, that means to check either the first +visible position of the last screen line in @var{window}, or the +end-of-buffer position, whichever comes first. This function considers only vertical scrolling. If @var{position} is out of view only because @var{window} has been scrolled horizontally, diff --git a/src/window.c b/src/window.c index 0f35066c7d5..8d899d6d350 100644 --- a/src/window.c +++ b/src/window.c @@ -1686,8 +1686,9 @@ Return nil if that position is scrolled vertically out of view. If a character is only partially visible, nil is returned, unless the optional argument PARTIALLY is non-nil. If POS is only out of view because of horizontal scrolling, return non-nil. If POS is t, it -specifies the position of the first glyph displayed on the last visible -screen line in WINDOW. POS defaults to point in WINDOW; WINDOW defaults +specifies the position of either the first position displayed on the +last visible screen line in WINDOW, or the end-of-buffer position, +whichever comes first. POS defaults to point in WINDOW; WINDOW defaults to the selected window. If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil,