/[emacs]/emacs/lispref/windows.texi
ViewVC logotype

Diff of /emacs/lispref/windows.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.64.2.2 by miles, Sat Jul 17 02:46:47 2004 UTC revision 1.64.2.3 by miles, Fri Jul 23 04:30:39 2004 UTC
# Line 1195  forms.  But that value is hard to find. Line 1195  forms.  But that value is hard to find.
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
# Line 1233  window-start position to change in respo Line 1233  window-start position to change in respo
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
# Line 1324  position that works well with point, and Line 1324  position that works well with point, and
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
# Line 1348  Here is an example: Line 1361  Here is an 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.
# Line 1419  When the selected window is the minibuff Line 1432  When the selected window is the minibuff
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,
# Line 1563  lines, depends on what the lines contain Line 1579  lines, depends on what the lines contain
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
# Line 1576  used. Line 1593  used.
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.
# Line 1595  The return value is the result of this r Line 1612  The return value is the result of this r
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
# Line 1803  the frame.  The element @var{right} of t Line 1823  the frame.  The element @var{right} of t
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
# Line 1877  and the inside edges of the right window Line 1898  and the inside edges of the right window
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.
# Line 1975  However, the command does nothing if the Line 1996  However, the command does nothing if the
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
# Line 1988  If the value is @code{height}, then only Line 2012  If the value is @code{height}, then only
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.
# Line 2132  old one. Line 2154  old one.
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}:
# Line 2151  as @code{save-window-excursion}: Line 2174  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    
# Line 2275  This function sets @var{window}'s end tr Line 2299  This function sets @var{window}'s end tr
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

Legend:
Removed from v.1.64.2.2  
changed lines
  Added in v.1.64.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26