1195 |
|
|
1196 |
@defun set-window-point window position |
@defun set-window-point window position |
1197 |
This function positions point in @var{window} at position |
This function positions point in @var{window} at position |
1198 |
@var{position} in @var{window}'s buffer. |
@var{position} in @var{window}'s buffer. It returns @var{position}. |
1199 |
@end defun |
@end defun |
1200 |
|
|
1201 |
@node Window Start |
@node Window Start |
1233 |
redisplay. |
redisplay. |
1234 |
|
|
1235 |
For a realistic example of using @code{window-start}, see the |
For a realistic example of using @code{window-start}, see the |
1236 |
description of @code{count-lines} in @ref{Text Lines}. |
description of @code{count-lines}. @xref{Definition of count-lines}. |
1237 |
@end defun |
@end defun |
1238 |
|
|
1239 |
@defun window-end &optional window update |
@defun window-end &optional window update |
1324 |
@end defun |
@end defun |
1325 |
|
|
1326 |
@defun pos-visible-in-window-p &optional position window partially |
@defun pos-visible-in-window-p &optional position window partially |
1327 |
This function returns @code{t} if @var{position} is within the range of |
This function returns non-@code{nil} if @var{position} is within the |
1328 |
text currently visible on the screen in @var{window}. It returns |
range of text currently visible on the screen in @var{window}. It |
1329 |
@code{nil} if @var{position} is scrolled vertically or horizontally out |
returns @code{nil} if @var{position} is scrolled vertically out of |
1330 |
of view. Locations that are partially obscured are not considered |
view. Locations that are partially obscured are not considered |
1331 |
visible unless @var{partially} is non-@code{nil}. The argument |
visible unless @var{partially} is non-@code{nil}. The argument |
1332 |
@var{position} defaults to the current position of point in |
@var{position} defaults to the current position of point in |
1333 |
@var{window}; @var{window}, to the selected window. |
@var{window}; @var{window}, to the selected window. |
1334 |
|
|
1335 |
|
The @code{pos-visible-in-window-p} function considers only vertical |
1336 |
|
scrolling. If @var{position} is out of view only because @var{window} |
1337 |
|
has been scrolled horizontally, @code{pos-visible-in-window-p} returns |
1338 |
|
non-@code{nil} anyway. @xref{Horizontal Scrolling}. |
1339 |
|
|
1340 |
|
If @var{position} is visible, @code{pos-visible-in-window-p} returns |
1341 |
|
@code{t} if @var{partially} is @code{nil}; if @var{partially} is |
1342 |
|
non-@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 |
1344 |
|
relative 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 |
|
|
1348 |
Here is an example: |
Here is an example: |
1349 |
|
|
1350 |
@example |
@example |
1361 |
@cindex textual scrolling |
@cindex textual scrolling |
1362 |
@cindex scrolling textually |
@cindex scrolling textually |
1363 |
|
|
1364 |
@dfn{Textual scrolling} means moving the text up or down though a |
@dfn{Textual scrolling} means moving the text up or down through a |
1365 |
window. It works by changing the value of the window's display-start |
window. It works by changing the value of the window's display-start |
1366 |
location. It may also change the value of @code{window-point} to keep |
location. It may also change the value of @code{window-point} to keep |
1367 |
point on the screen. |
point on the screen. |
1432 |
the one at the top left corner. You can specify a different window to |
the one at the top left corner. You can specify a different window to |
1433 |
scroll, when the minibuffer is selected, by setting the variable |
scroll, when the minibuffer is selected, by setting the variable |
1434 |
@code{minibuffer-scroll-window}. This variable has no effect when any |
@code{minibuffer-scroll-window}. This variable has no effect when any |
1435 |
other window is selected. @xref{Minibuffer Misc}. |
other window is selected. When it is non-@code{nil} and the |
1436 |
|
minibuffer is selected, it takes precedence over |
1437 |
|
@code{other-window-scroll-buffer}. @xref{Definition of |
1438 |
|
minibuffer-scroll-window}. |
1439 |
|
|
1440 |
When the minibuffer is active, it is the next window if the selected |
When the minibuffer is active, it is the next window if the selected |
1441 |
window is the one at the bottom right corner. In this case, |
window is the one at the bottom right corner. In this case, |
1579 |
line whose height is very short off the screen, while a value of 3.3 |
line whose height is very short off the screen, while a value of 3.3 |
1580 |
could scroll just part of the way through a tall line or an image. |
could scroll just part of the way through a tall line or an image. |
1581 |
|
|
1582 |
@defun window-vscroll &optional window |
@defun window-vscroll &optional window pixels-p |
1583 |
This function returns the current vertical scroll position of |
This function returns the current vertical scroll position of |
1584 |
@var{window}, If @var{window} is @code{nil}, the selected window is |
@var{window}. If @var{window} is @code{nil}, the selected window is |
1585 |
used. |
used. If @var{pixels-p} is non-@code{nil}, the return value is |
1586 |
|
measured in pixels, rather than in units of the normal line height. |
1587 |
|
|
1588 |
@example |
@example |
1589 |
@group |
@group |
1593 |
@end example |
@end example |
1594 |
@end defun |
@end defun |
1595 |
|
|
1596 |
@defun set-window-vscroll window lines |
@defun set-window-vscroll window lines &optional pixels-p |
1597 |
This function sets @var{window}'s vertical scroll position to |
This function sets @var{window}'s vertical scroll position to |
1598 |
@var{lines}. The argument @var{lines} should be zero or positive; if |
@var{lines}. The argument @var{lines} should be zero or positive; if |
1599 |
not, it is taken as zero. |
not, it is taken as zero. |
1612 |
@result{} 1.13 |
@result{} 1.13 |
1613 |
@end group |
@end group |
1614 |
@end example |
@end example |
1615 |
|
|
1616 |
|
If @var{pixels-p} is non-@code{nil}, @var{lines} specifies a number of |
1617 |
|
pixels. In this case, the return value is @var{lines}. |
1618 |
@end defun |
@end defun |
1619 |
|
|
1620 |
@node Horizontal Scrolling |
@node Horizontal Scrolling |
1823 |
rightmost column used by @var{window}, and @var{bottom} is one more than |
rightmost column used by @var{window}, and @var{bottom} is one more than |
1824 |
the bottommost row used by @var{window} and its mode-line. |
the bottommost row used by @var{window} and its mode-line. |
1825 |
|
|
1826 |
If a window has a scroll bar, the right edge value includes the width of |
The edges include the space used by the window's scroll bar, display |
1827 |
the scroll bar. Otherwise, if the window has a neighbor on the right, |
margins, fringes, header line, and mode line, if it has them. Also, |
1828 |
its right edge value includes the width of the separator line between |
if the window has a neighbor on the right, its right edge value |
1829 |
the window and that neighbor. Since the width of the window does not |
includes the width of the separator line between the window and that |
1830 |
include this separator, the width does not usually equal the difference |
neighbor. Since the width of the window does not include this |
1831 |
between the right and left edges. |
separator, the width does not usually equal the difference between the |
1832 |
|
right and left edges. |
1833 |
@end defun |
@end defun |
1834 |
|
|
1835 |
@defun window-inside-edges window |
@defun window-inside-edges &optional window |
1836 |
This is similar to @code{window-edges}, but the edge values |
This is similar to @code{window-edges}, but the edge values |
1837 |
it returns include only the text area of the window. They |
it returns include only the text area of the window. They |
1838 |
do not include the header line, mode line, scroll bar or |
do not include the header line, mode line, scroll bar or |
1898 |
@end group |
@end group |
1899 |
@end example |
@end example |
1900 |
|
|
1901 |
@defun window-pixel-edges window |
@defun window-pixel-edges &optional window |
1902 |
This function is like @code{window-edges} except that, on a graphical |
This function is like @code{window-edges} except that, on a graphical |
1903 |
display, the edge values are measured in pixels instead of in |
display, the edge values are measured in pixels instead of in |
1904 |
character lines and columns. |
character lines and columns. |
1905 |
@end defun |
@end defun |
1906 |
|
|
1907 |
@defun window-inside-pixel-edges window |
@defun window-inside-pixel-edges &optional window |
1908 |
This function is like @code{window-inside-edges} except that, on a |
This function is like @code{window-inside-edges} except that, on a |
1909 |
graphical display, the edge values are measured in pixels instead of |
graphical display, the edge values are measured in pixels instead of |
1910 |
in character lines and columns. |
in character lines and columns. |
1996 |
display the whole text of the buffer, or if part of the contents are |
display the whole text of the buffer, or if part of the contents are |
1997 |
currently scrolled off screen, or if the window is not the full width of |
currently scrolled off screen, or if the window is not the full width of |
1998 |
its frame, or if the window is the only window in its frame. |
its frame, or if the window is the only window in its frame. |
1999 |
|
|
2000 |
|
This command returns non-@code{nil} if it actually shrank the window |
2001 |
|
and @code{nil} otherwise. |
2002 |
@end deffn |
@end deffn |
2003 |
|
|
2004 |
@tindex window-size-fixed |
@tindex window-size-fixed |
2012 |
if the value is @code{width}, then only the window's width is fixed. |
if the value is @code{width}, then only the window's width is fixed. |
2013 |
Any other non-@code{nil} value fixes both the width and the height. |
Any other non-@code{nil} value fixes both the width and the height. |
2014 |
|
|
2015 |
The usual way to use this variable is to give it a buffer-local value in |
This variable automatically becomes buffer-local when set. |
|
a particular buffer. That way, the windows (but usually there is only |
|
|
one) displaying that buffer have fixed size. |
|
2016 |
|
|
2017 |
Explicit size-change functions such as @code{enlarge-window} |
Explicit size-change functions such as @code{enlarge-window} |
2018 |
get an error if they would have to change a window size which is fixed. |
get an error if they would have to change a window size which is fixed. |
2154 |
|
|
2155 |
If the frame which @var{configuration} was saved from is dead, all this |
If the frame which @var{configuration} was saved from is dead, all this |
2156 |
function does is restore the three variables @code{window-min-height}, |
function does is restore the three variables @code{window-min-height}, |
2157 |
@code{window-min-width} and @code{minibuffer-scroll-window}. |
@code{window-min-width} and @code{minibuffer-scroll-window}. In this |
2158 |
|
case, the function returns @code{nil}. Otherwise, it returns @code{t}. |
2159 |
|
|
2160 |
Here is a way of using this function to get the same effect |
Here is a way of using this function to get the same effect |
2161 |
as @code{save-window-excursion}: |
as @code{save-window-excursion}: |
2174 |
@defspec save-window-excursion forms@dots{} |
@defspec save-window-excursion forms@dots{} |
2175 |
This special form records the window configuration, executes @var{forms} |
This special form records the window configuration, executes @var{forms} |
2176 |
in sequence, then restores the earlier window configuration. The window |
in sequence, then restores the earlier window configuration. The window |
2177 |
configuration includes the value of point and the portion of the buffer |
configuration includes, for each window, the value of point and the |
2178 |
that is visible. It also includes the choice of selected window. |
portion of the buffer that is visible. It also includes the choice of |
2179 |
However, it does not include the value of point in the current buffer; |
selected window. However, it does not include the value of point in |
2180 |
use @code{save-excursion} also, if you wish to preserve that. |
the current buffer; use @code{save-excursion} also, if you wish to |
2181 |
|
preserve that. |
2182 |
|
|
2183 |
Don't use this construct when @code{save-selected-window} is sufficient. |
Don't use this construct when @code{save-selected-window} is sufficient. |
2184 |
|
|
2299 |
|
|
2300 |
@defun window-redisplay-end-trigger &optional window |
@defun window-redisplay-end-trigger &optional window |
2301 |
This function returns @var{window}'s current end trigger position. |
This function returns @var{window}'s current end trigger position. |
2302 |
|
If @var{window} is @code{nil} or omitted, it uses the selected window. |
2303 |
@end defun |
@end defun |
2304 |
|
|
2305 |
@defvar window-configuration-change-hook |
@defvar window-configuration-change-hook |