aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorMiles Bader2006-10-03 05:04:21 +0000
committerMiles Bader2006-10-03 05:04:21 +0000
commitf3bbbd11451643c49997116d639612ae434dcaa0 (patch)
tree6ce54c0dbf43746478357847960e9621fe3a5719 /src/window.c
parent84356ba74da100da043fea790d1253b2d92e9110 (diff)
parent670992917f2ee196a667797e4c3806d89c0f6d61 (diff)
downloademacs-f3bbbd11451643c49997116d639612ae434dcaa0.tar.gz
emacs-f3bbbd11451643c49997116d639612ae434dcaa0.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 447-459) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 141-144) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-115
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/window.c b/src/window.c
index 2a3d29a8da8..a78360cda2f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -333,6 +333,7 @@ Return nil if that position is scrolled vertically out of view.
333If a character is only partially visible, nil is returned, unless the 333If a character is only partially visible, nil is returned, unless the
334optional argument PARTIALLY is non-nil. 334optional argument PARTIALLY is non-nil.
335If POS is only out of view because of horizontal scrolling, return non-nil. 335If POS is only out of view because of horizontal scrolling, return non-nil.
336If POS is t, it specifies the position of the last visible glyph in WINDOW.
336POS defaults to point in WINDOW; WINDOW defaults to the selected window. 337POS defaults to point in WINDOW; WINDOW defaults to the selected window.
337 338
338If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, 339If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil,
@@ -340,7 +341,7 @@ return value is a list of 2 or 6 elements (X Y [RTOP RBOT ROWH VPOS]),
340where X and Y are the pixel coordinates relative to the top left corner 341where X and Y are the pixel coordinates relative to the top left corner
341of the window. The remaining elements are omitted if the character after 342of the window. The remaining elements are omitted if the character after
342POS is fully visible; otherwise, RTOP and RBOT are the number of pixels 343POS is fully visible; otherwise, RTOP and RBOT are the number of pixels
343off-screen at the top and bottom of the row, ROWH is the height of the 344off-window at the top and bottom of the row, ROWH is the height of the
344display row, and VPOS is the row number (0-based) containing POS. */) 345display row, and VPOS is the row number (0-based) containing POS. */)
345 (pos, window, partially) 346 (pos, window, partially)
346 Lisp_Object pos, window, partially; 347 Lisp_Object pos, window, partially;
@@ -357,7 +358,9 @@ display row, and VPOS is the row number (0-based) containing POS. */)
357 buf = XBUFFER (w->buffer); 358 buf = XBUFFER (w->buffer);
358 SET_TEXT_POS_FROM_MARKER (top, w->start); 359 SET_TEXT_POS_FROM_MARKER (top, w->start);
359 360
360 if (!NILP (pos)) 361 if (EQ (pos, Qt))
362 posint = -1;
363 else if (!NILP (pos))
361 { 364 {
362 CHECK_NUMBER_COERCE_MARKER (pos); 365 CHECK_NUMBER_COERCE_MARKER (pos);
363 posint = XINT (pos); 366 posint = XINT (pos);
@@ -369,8 +372,8 @@ display row, and VPOS is the row number (0-based) containing POS. */)
369 372
370 /* If position is above window start or outside buffer boundaries, 373 /* If position is above window start or outside buffer boundaries,
371 or if window start is out of range, position is not visible. */ 374 or if window start is out of range, position is not visible. */
372 if (posint >= CHARPOS (top) 375 if ((EQ (pos, Qt)
373 && posint <= BUF_ZV (buf) 376 || (posint >= CHARPOS (top) && posint <= BUF_ZV (buf)))
374 && CHARPOS (top) >= BUF_BEGV (buf) 377 && CHARPOS (top) >= BUF_BEGV (buf)
375 && CHARPOS (top) <= BUF_ZV (buf) 378 && CHARPOS (top) <= BUF_ZV (buf)
376 && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, &rowh, &vpos) 379 && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, &rowh, &vpos)
@@ -402,10 +405,10 @@ counts from the end of the window.
402 405
403Value is a list (HEIGHT VPOS YPOS OFFBOT), where HEIGHT is the height 406Value is a list (HEIGHT VPOS YPOS OFFBOT), where HEIGHT is the height
404in pixels of the visible part of the line, VPOS and YPOS are the 407in pixels of the visible part of the line, VPOS and YPOS are the
405vertical position in lines and pixels of the row, relative to the top 408vertical position in lines and pixels of the line, relative to the top
406of the first text line, and OFFBOT is the number of off-screen pixels at 409of the first text line, and OFFBOT is the number of off-window pixels at
407the bottom of the text row. If there are off-screen pixels at the top 410the bottom of the text line. If there are off-window pixels at the top
408of the (first) text row, YPOS is negative. 411of the (first) text line, YPOS is negative.
409 412
410Return nil if window display is not up-to-date. In that case, use 413Return nil if window display is not up-to-date. In that case, use
411`pos-visible-in-window-p' to obtain the information. */) 414`pos-visible-in-window-p' to obtain the information. */)
@@ -565,7 +568,7 @@ DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0,
565Return NCOL. NCOL should be zero or positive. 568Return NCOL. NCOL should be zero or positive.
566 569
567Note that if `automatic-hscrolling' is non-nil, you cannot scroll the 570Note that if `automatic-hscrolling' is non-nil, you cannot scroll the
568window so that the location of point moves off-screen. */) 571window so that the location of point moves off-window. */)
569 (window, ncol) 572 (window, ncol)
570 Lisp_Object window, ncol; 573 Lisp_Object window, ncol;
571{ 574{