/[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.62 by rms, Mon Jun 30 10:43:22 2003 UTC revision 1.63 by rms, Mon Jul 14 16:04:44 2003 UTC
# Line 401  This function returns the selected windo Line 401  This function returns the selected windo
401  which the cursor appears and to which many commands apply.  which the cursor appears and to which many commands apply.
402  @end defun  @end defun
403    
404  @defun select-window window  @defun select-window window &optional norecord
405  This function makes @var{window} the selected window.  The cursor then  This function makes @var{window} the selected window.  The cursor then
406  appears in @var{window} (on redisplay).  The buffer being displayed in  appears in @var{window} (on redisplay).  The buffer being displayed in
407  @var{window} is immediately designated the current buffer.  @var{window} is immediately designated the current buffer.
408    
409    Normally @var{window}'s selected buffer is moved to the front of the
410    buffer list, but if @var{norecord} is non-@code{nil}, the buffer list
411    order is unchanged.
412    
413  The return value is @var{window}.  The return value is @var{window}.
414    
415  @example  @example
# Line 432  about other frames.  If the @var{forms} Line 436  about other frames.  If the @var{forms}
436  alter the window selected within it, the change persists.  alter the window selected within it, the change persists.
437  @end defmac  @end defmac
438    
439    @defmac with-selected-window window forms@dots{}
440    This macro selects @var{window} (without changing the buffer list),
441    executes @var{forms} in sequence, then restores the previously
442    selected window (unless that window is no longer alive).  It is similar
443    to @code{save-selected-window} except that it explicitly selects
444    @var{window} and that it does not alter the buffer list sequence.
445    @end defmac
446    
447  @cindex finding windows  @cindex finding windows
448    The following functions choose one of the windows on the screen,    The following functions choose one of the windows on the screen,
449  offering various criteria for the choice.  offering various criteria for the choice.
# Line 1733  its right edge value includes the width Line 1745  its right edge value includes the width
1745  the window and that neighbor.  Since the width of the window does not  the window and that neighbor.  Since the width of the window does not
1746  include this separator, the width does not usually equal the difference  include this separator, the width does not usually equal the difference
1747  between the right and left edges.  between the right and left edges.
1748    @end defun
1749    
1750    @defun window-inside-edges window
1751    This is similar to @code{window-edges}, but the edge values
1752    it returns include only the text area of the window.  They
1753    do not include the header line, mode line, scroll bar or
1754    vertical separator, fringes, or display margins.
1755    @end defun
1756    
1757  Here is the result obtained on a typical 24-line terminal with just one  Here are the results obtained on a typical 24-line terminal with just
1758  window:  one window, with menu bar enabled:
1759    
1760  @example  @example
1761  @group  @group
1762  (window-edges (selected-window))  (window-edges (selected-window))
1763       @result{} (0 0 80 23)       @result{} (0 1 80 23)
1764    @end group
1765    @group
1766    (window-inside-edges (selected-window))
1767         @result{} (0 1 80 22)
1768  @end group  @end group
1769  @end example  @end example
1770    
1771  @noindent  @noindent
1772  The bottom edge is at line 23 because the last line is the echo area.  The bottom edge is at line 23 because the last line is the echo area.
1773    The bottom inside edge is at line 22, which is the window's mode line.
1774    
1775  If @var{window} is at the upper left corner of its frame, then  If @var{window} is at the upper left corner of its frame, and there is
1776  @var{bottom} is the same as the value of @code{(window-height)},  no menu bar, then @var{bottom} returned by @code{window-edges} is the
1777  @var{right} is almost the same as the value of @code{(window-width)},  same as the value of @code{(window-height)}, @var{right} is almost the
1778  and @var{top} and @var{left} are zero.  For example, the edges of the  same as the value of @code{(window-width)}, and @var{top} and
1779  following window are @w{@samp{0 0 8 5}}.  Assuming that the frame has  @var{left} are zero.  For example, the edges of the following window
1780  more than 8 columns, the last column of the window (column 7) holds a  are @w{@samp{0 0 8 5}}.  Assuming that the frame has more than 8
1781  border rather than text.  The last row (row 4) holds the mode line,  columns, the last column of the window (column 7) holds a border
1782  shown here with @samp{xxxxxxxxx}.  rather than text.  The last row (row 4) holds the mode line, shown
1783    here with @samp{xxxxxxxxx}.
1784    
1785  @example  @example
1786  @group  @group
# Line 1772  shown here with @samp{xxxxxxxxx}. Line 1798  shown here with @samp{xxxxxxxxx}.
1798    
1799  In the following example, let's suppose that the frame is 7  In the following example, let's suppose that the frame is 7
1800  columns wide.  Then the edges of the left window are @w{@samp{0 0 4 3}}  columns wide.  Then the edges of the left window are @w{@samp{0 0 4 3}}
1801  and the edges of the right window are @w{@samp{4 0 8 3}}.  and the edges of the right window are @w{@samp{4 0 7 3}}.
1802    The inside edges of the left window are @w{@samp{0 0 3 2}},
1803    and the inside edges of the right window are @w{@samp{4 0 7 2}},
1804    
1805  @example  @example
1806  @group  @group
# Line 1784  and the edges of the right window are @w Line 1812  and the edges of the right window are @w
1812             0  34  7             0  34  7
1813  @end group  @end group
1814  @end example  @end example
1815    
1816    @defun window-pixel-edges window
1817    This function is like @code{window-edges} except that, on a graphical
1818    display, the edge values are measured in pixels instead of in
1819    character lines and columns.
1820    @end defun
1821    
1822    @defun window-inside-pixel-edges window
1823    This function is like @code{window-inside-edges} except that, on a
1824    graphical display, the edge values are measured in pixels instead of
1825    in character lines and columns.
1826  @end defun  @end defun
1827    
1828  @node Resizing Windows  @node Resizing Windows

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.63

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