aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2004-07-19 21:33:37 +0000
committerLuc Teirlinck2004-07-19 21:33:37 +0000
commiteab4e895a509fd818f252892665b2ce775d439f4 (patch)
treedacfb3fce6e5002f82d1d8dd06970e9797d3b3f8
parentf96bad52a42c247ff27af64392d09787a8b1f1fa (diff)
downloademacs-eab4e895a509fd818f252892665b2ce775d439f4.tar.gz
emacs-eab4e895a509fd818f252892665b2ce775d439f4.zip
Various small changes in addition to:
(Window Point): Mention return value of `set-window-point'. (Window Start): `pos-visible-in-window-p' disregards horizontal scrolling. Explain return value if PARTIALLY is non-nil. (Vertical Scrolling): Mention PIXELS-P argument to `window-vscroll' and `set-window-vscroll'. (Size of Window): The argument WINDOW to `window-inside-edges', `window-pixel-edges' and `window-inside-pixel-edges' is optional. (Resizing Windows): Explain return value of `shrink-window-if-larger-than-buffer'. `window-size-fixed' automatically becomes buffer local when set. (Window Configurations): Explain return value of `set-window-configuration'.
-rw-r--r--lispref/windows.texi83
1 files changed, 54 insertions, 29 deletions
diff --git a/lispref/windows.texi b/lispref/windows.texi
index 92eb6cbc85d..a01dc79d1f1 100644
--- a/lispref/windows.texi
+++ b/lispref/windows.texi
@@ -1195,7 +1195,7 @@ forms. But that value is hard to find.
1195 1195
1196@defun set-window-point window position 1196@defun set-window-point window position
1197This function positions point in @var{window} at position 1197This function positions point in @var{window} at position
1198@var{position} in @var{window}'s buffer. 1198@var{position} in @var{window}'s buffer. It returns @var{position}.
1199@end defun 1199@end defun
1200 1200
1201@node Window Start 1201@node Window Start
@@ -1233,7 +1233,7 @@ window-start position to change in response until after the next
1233redisplay. 1233redisplay.
1234 1234
1235For a realistic example of using @code{window-start}, see the 1235For a realistic example of using @code{window-start}, see the
1236description of @code{count-lines} in @ref{Text Lines}. 1236description of @code{count-lines}. @xref{Definition of count-lines}.
1237@end defun 1237@end defun
1238 1238
1239@defun window-end &optional window update 1239@defun window-end &optional window update
@@ -1324,14 +1324,27 @@ position that works well with point, and thus @var{position} is not used.
1324@end defun 1324@end defun
1325 1325
1326@defun pos-visible-in-window-p &optional position window partially 1326@defun pos-visible-in-window-p &optional position window partially
1327This function returns @code{t} if @var{position} is within the range of 1327This function returns non-@code{nil} if @var{position} is within the
1328text currently visible on the screen in @var{window}. It returns 1328range of text currently visible on the screen in @var{window}. It
1329@code{nil} if @var{position} is scrolled vertically or horizontally out 1329returns @code{nil} if @var{position} is scrolled vertically out of
1330of view. Locations that are partially obscured are not considered 1330view. Locations that are partially obscured are not considered
1331visible unless @var{partially} is non-@code{nil}. The argument 1331visible unless @var{partially} is non-@code{nil}. The argument
1332@var{position} defaults to the current position of point in 1332@var{position} defaults to the current position of point in
1333@var{window}; @var{window}, to the selected window. 1333@var{window}; @var{window}, to the selected window.
1334 1334
1335The @code{pos-visible-in-window-p} function considers only vertical
1336scrolling. If @var{position} is out of view only because @var{window}
1337has been scrolled horizontally, @code{pos-visible-in-window-p} returns
1338non-@code{nil} anyway. @xref{Horizontal Scrolling}.
1339
1340If @var{position} is visible, @code{pos-visible-in-window-p} returns
1341@code{t} if @var{partially} is @code{nil}; if @var{partially} is
1342non-@code{nil}, it returns a list of the form @code{(@var{x} @var{y}
1343@var{fully})}, where @var{x} and @var{y} are the pixel coordinates
1344relative to the top left corner of the window, and @var{fully} is
1345@code{t} if the character after @var{position} is fully visible and
1346@code{nil} otherwise.
1347
1335Here is an example: 1348Here is an example:
1336 1349
1337@example 1350@example
@@ -1348,7 +1361,7 @@ Here is an example:
1348@cindex textual scrolling 1361@cindex textual scrolling
1349@cindex scrolling textually 1362@cindex scrolling textually
1350 1363
1351 @dfn{Textual scrolling} means moving the text up or down though a 1364 @dfn{Textual scrolling} means moving the text up or down through a
1352window. It works by changing the value of the window's display-start 1365window. It works by changing the value of the window's display-start
1353location. It may also change the value of @code{window-point} to keep 1366location. It may also change the value of @code{window-point} to keep
1354point on the screen. 1367point on the screen.
@@ -1419,7 +1432,10 @@ When the selected window is the minibuffer, the next window is normally
1419the one at the top left corner. You can specify a different window to 1432the one at the top left corner. You can specify a different window to
1420scroll, when the minibuffer is selected, by setting the variable 1433scroll, when the minibuffer is selected, by setting the variable
1421@code{minibuffer-scroll-window}. This variable has no effect when any 1434@code{minibuffer-scroll-window}. This variable has no effect when any
1422other window is selected. @xref{Minibuffer Misc}. 1435other window is selected. When it is non-@code{nil} and the
1436minibuffer is selected, it takes precedence over
1437@code{other-window-scroll-buffer}. @xref{Definition of
1438minibuffer-scroll-window}.
1423 1439
1424When the minibuffer is active, it is the next window if the selected 1440When the minibuffer is active, it is the next window if the selected
1425window is the one at the bottom right corner. In this case, 1441window is the one at the bottom right corner. In this case,
@@ -1563,10 +1579,11 @@ lines, depends on what the lines contain. A value of .5 could scroll a
1563line whose height is very short off the screen, while a value of 3.3 1579line whose height is very short off the screen, while a value of 3.3
1564could scroll just part of the way through a tall line or an image. 1580could scroll just part of the way through a tall line or an image.
1565 1581
1566@defun window-vscroll &optional window 1582@defun window-vscroll &optional window pixels-p
1567This function returns the current vertical scroll position of 1583This function returns the current vertical scroll position of
1568@var{window}, If @var{window} is @code{nil}, the selected window is 1584@var{window}. If @var{window} is @code{nil}, the selected window is
1569used. 1585used. If @var{pixels-p} is non-@code{nil}, the return value is
1586measured in pixels, rather than in units of the normal line height.
1570 1587
1571@example 1588@example
1572@group 1589@group
@@ -1576,7 +1593,7 @@ used.
1576@end example 1593@end example
1577@end defun 1594@end defun
1578 1595
1579@defun set-window-vscroll window lines 1596@defun set-window-vscroll window lines &optional pixels-p
1580This function sets @var{window}'s vertical scroll position to 1597This function sets @var{window}'s vertical scroll position to
1581@var{lines}. The argument @var{lines} should be zero or positive; if 1598@var{lines}. The argument @var{lines} should be zero or positive; if
1582not, it is taken as zero. 1599not, it is taken as zero.
@@ -1595,6 +1612,9 @@ The return value is the result of this rounding.
1595 @result{} 1.13 1612 @result{} 1.13
1596@end group 1613@end group
1597@end example 1614@end example
1615
1616If @var{pixels-p} is non-@code{nil}, @var{lines} specifies a number of
1617pixels. In this case, the return value is @var{lines}.
1598@end defun 1618@end defun
1599 1619
1600@node Horizontal Scrolling 1620@node Horizontal Scrolling
@@ -1803,15 +1823,16 @@ the frame. The element @var{right} of the value is one more than the
1803rightmost column used by @var{window}, and @var{bottom} is one more than 1823rightmost column used by @var{window}, and @var{bottom} is one more than
1804the bottommost row used by @var{window} and its mode-line. 1824the bottommost row used by @var{window} and its mode-line.
1805 1825
1806If a window has a scroll bar, the right edge value includes the width of 1826The edges include the space used by the window's scroll bar, display
1807the scroll bar. Otherwise, if the window has a neighbor on the right, 1827margins, fringes, header line, and mode line, if it has them. Also,
1808its right edge value includes the width of the separator line between 1828if the window has a neighbor on the right, its right edge value
1809the window and that neighbor. Since the width of the window does not 1829includes the width of the separator line between the window and that
1810include this separator, the width does not usually equal the difference 1830neighbor. Since the width of the window does not include this
1811between the right and left edges. 1831separator, the width does not usually equal the difference between the
1832right and left edges.
1812@end defun 1833@end defun
1813 1834
1814@defun window-inside-edges window 1835@defun window-inside-edges &optional window
1815This is similar to @code{window-edges}, but the edge values 1836This is similar to @code{window-edges}, but the edge values
1816it returns include only the text area of the window. They 1837it returns include only the text area of the window. They
1817do not include the header line, mode line, scroll bar or 1838do not include the header line, mode line, scroll bar or
@@ -1877,13 +1898,13 @@ and the inside edges of the right window are @w{@samp{4 0 7 2}},
1877@end group 1898@end group
1878@end example 1899@end example
1879 1900
1880@defun window-pixel-edges window 1901@defun window-pixel-edges &optional window
1881This function is like @code{window-edges} except that, on a graphical 1902This function is like @code{window-edges} except that, on a graphical
1882display, the edge values are measured in pixels instead of in 1903display, the edge values are measured in pixels instead of in
1883character lines and columns. 1904character lines and columns.
1884@end defun 1905@end defun
1885 1906
1886@defun window-inside-pixel-edges window 1907@defun window-inside-pixel-edges &optional window
1887This function is like @code{window-inside-edges} except that, on a 1908This function is like @code{window-inside-edges} except that, on a
1888graphical display, the edge values are measured in pixels instead of 1909graphical display, the edge values are measured in pixels instead of
1889in character lines and columns. 1910in character lines and columns.
@@ -1975,6 +1996,9 @@ However, the command does nothing if the window is already too small to
1975display the whole text of the buffer, or if part of the contents are 1996display the whole text of the buffer, or if part of the contents are
1976currently scrolled off screen, or if the window is not the full width of 1997currently scrolled off screen, or if the window is not the full width of
1977its frame, or if the window is the only window in its frame. 1998its frame, or if the window is the only window in its frame.
1999
2000This command returns non-@code{nil} if it actually shrank the window
2001and @code{nil} otherwise.
1978@end deffn 2002@end deffn
1979 2003
1980@tindex window-size-fixed 2004@tindex window-size-fixed
@@ -1988,9 +2012,7 @@ If the value is @code{height}, then only the window's height is fixed;
1988if the value is @code{width}, then only the window's width is fixed. 2012if the value is @code{width}, then only the window's width is fixed.
1989Any other non-@code{nil} value fixes both the width and the height. 2013Any other non-@code{nil} value fixes both the width and the height.
1990 2014
1991The usual way to use this variable is to give it a buffer-local value in 2015This variable automatically becomes buffer-local when set.
1992a particular buffer. That way, the windows (but usually there is only
1993one) displaying that buffer have fixed size.
1994 2016
1995Explicit size-change functions such as @code{enlarge-window} 2017Explicit size-change functions such as @code{enlarge-window}
1996get an error if they would have to change a window size which is fixed. 2018get an error if they would have to change a window size which is fixed.
@@ -2132,7 +2154,8 @@ old one.
2132 2154
2133If the frame which @var{configuration} was saved from is dead, all this 2155If the frame which @var{configuration} was saved from is dead, all this
2134function does is restore the three variables @code{window-min-height}, 2156function does is restore the three variables @code{window-min-height},
2135@code{window-min-width} and @code{minibuffer-scroll-window}. 2157@code{window-min-width} and @code{minibuffer-scroll-window}. In this
2158case, the function returns @code{nil}. Otherwise, it returns @code{t}.
2136 2159
2137Here is a way of using this function to get the same effect 2160Here is a way of using this function to get the same effect
2138as @code{save-window-excursion}: 2161as @code{save-window-excursion}:
@@ -2151,10 +2174,11 @@ as @code{save-window-excursion}:
2151@defspec save-window-excursion forms@dots{} 2174@defspec save-window-excursion forms@dots{}
2152This special form records the window configuration, executes @var{forms} 2175This special form records the window configuration, executes @var{forms}
2153in sequence, then restores the earlier window configuration. The window 2176in sequence, then restores the earlier window configuration. The window
2154configuration includes the value of point and the portion of the buffer 2177configuration includes, for each window, the value of point and the
2155that is visible. It also includes the choice of selected window. 2178portion of the buffer that is visible. It also includes the choice of
2156However, it does not include the value of point in the current buffer; 2179selected window. However, it does not include the value of point in
2157use @code{save-excursion} also, if you wish to preserve that. 2180the current buffer; use @code{save-excursion} also, if you wish to
2181preserve that.
2158 2182
2159Don't use this construct when @code{save-selected-window} is sufficient. 2183Don't use this construct when @code{save-selected-window} is sufficient.
2160 2184
@@ -2275,6 +2299,7 @@ This function sets @var{window}'s end trigger position at
2275 2299
2276@defun window-redisplay-end-trigger &optional window 2300@defun window-redisplay-end-trigger &optional window
2277This function returns @var{window}'s current end trigger position. 2301This function returns @var{window}'s current end trigger position.
2302If @var{window} is @code{nil} or omitted, it uses the selected window.
2278@end defun 2303@end defun
2279 2304
2280@defvar window-configuration-change-hook 2305@defvar window-configuration-change-hook