/[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.78 by kfstorm, Sun Jan 23 13:30:22 2005 UTC revision 1.79 by rms, Thu Feb 3 07:19:07 2005 UTC
# Line 53  multiple nonoverlapping Emacs windows. Line 53  multiple nonoverlapping Emacs windows.
53    
54    In each frame, at any time, one and only one window is designated as    In each frame, at any time, one and only one window is designated as
55  @dfn{selected within the frame}.  The frame's cursor appears in that  @dfn{selected within the frame}.  The frame's cursor appears in that
56  window.  At any time, one frame is the selected frame; and the window  window, but the other windows have ``non-selected'' cursors, normally
57  selected within that frame is @dfn{the selected window}.  The selected  less visible.  At any time, one frame is the selected frame; and the
58  window's buffer is usually the current buffer (except when  window selected within that frame is @dfn{the selected window}.  The
59    selected window's buffer is usually the current buffer (except when
60  @code{set-buffer} has been used).  @xref{Current Buffer}.  @code{set-buffer} has been used).  @xref{Current Buffer}.
61    
62    @defvar cursor-in-non-selected-windows
63    If this variable is @code{nil}, Emacs displays only one cursor,
64    in the selected window.  Other windows have no cursor at all.
65    @end defvar
66    
67    For practical purposes, a window exists only while it is displayed in    For practical purposes, a window exists only while it is displayed in
68  a frame.  Once removed from the frame, the window is effectively deleted  a frame.  Once removed from the frame, the window is effectively deleted
69  and should not be used, @emph{even though there may still be references  and should not be used, @emph{even though there may still be references
# Line 455  The return value is @var{window}. Line 461  The return value is @var{window}.
461  @end defun  @end defun
462    
463  @defmac save-selected-window forms@dots{}  @defmac save-selected-window forms@dots{}
464  This macro records the selected window, as well as the selected window  This macro records the selected frame, as well as the selected window
465  of each frame, executes @var{forms} in sequence, then restores the  of each frame, executes @var{forms} in sequence, then restores the
466  earlier selected windows.  It returns the value of the last form in  earlier selected frame and windows It returns the value of the last
467  @var{forms}.  form in @var{forms}.
468    
469  This macro does not save or restore anything about the sizes,  This macro does not save or restore anything about the sizes,
470  arrangement or contents of windows; therefore, if the @var{forms}  arrangement or contents of windows; therefore, if the @var{forms}
# Line 648  In an interactive call, @var{count} is t Line 654  In an interactive call, @var{count} is t
654    
655  @c Emacs 19 feature  @c Emacs 19 feature
656  @defun walk-windows proc &optional minibuf all-frames  @defun walk-windows proc &optional minibuf all-frames
657  This function cycles through all windows, calling @code{proc}  This function cycles through all windows.  It calls the function
658  once for each window with the window as its sole argument.  @code{proc} once for each window, with the window as its sole
659    argument.
660    
661  The optional arguments @var{minibuf} and @var{all-frames} specify the  The optional arguments @var{minibuf} and @var{all-frames} specify the
662  set of windows to include in the scan.  See @code{next-window}, above,  set of windows to include in the scan.  See @code{next-window}, above,
# Line 1175  the other windows are stored in those wi Line 1182  the other windows are stored in those wi
1182  @item  @item
1183  As long as the selected window displays the current buffer, the window's  As long as the selected window displays the current buffer, the window's
1184  point and the buffer's point always move together; they remain equal.  point and the buffer's point always move together; they remain equal.
1185    @end itemize
1186    
1187  @item  @noindent
1188  @xref{Positions}, for more details on buffer positions.  @xref{Positions}, for more details on buffer positions.
 @end itemize  
1189    
1190    As far as the user is concerned, point is where the cursor is, and    As far as the user is concerned, point is where the cursor is, and
1191  when the user switches to another buffer, the cursor jumps to the  when the user switches to another buffer, the cursor jumps to the
# Line 1356  Here is an example: Line 1363  Here is an example:
1363    
1364  @example  @example
1365  @group  @group
1366    ;; @r{If point is off the screen now, recenter it now.}
1367  (or (pos-visible-in-window-p  (or (pos-visible-in-window-p
1368       (point) (selected-window))       (point) (selected-window))
1369      (recenter 0))      (recenter 0))
# Line 1984  It could be defined as follows: Line 1992  It could be defined as follows:
1992  @example  @example
1993  @group  @group
1994  (defun enlarge-window-horizontally (columns)  (defun enlarge-window-horizontally (columns)
1995      (interactive "p")
1996    (enlarge-window columns t))    (enlarge-window columns t))
1997  @end group  @end group
1998  @end example  @end example
# Line 2006  It could be defined as follows: Line 2015  It could be defined as follows:
2015  @example  @example
2016  @group  @group
2017  (defun shrink-window-horizontally (columns)  (defun shrink-window-horizontally (columns)
2018      (interactive "p")
2019    (shrink-window columns t))    (shrink-window columns t))
2020  @end group  @end group
2021  @end example  @end example
2022  @end deffn  @end deffn
2023    
2024    @defun fit-window-to-buffer &optional window max-height min-height
2025    This function makes @var{window} the right height to display its
2026    contents exactly.  If @var{window} is omitted or @code{nil}, it uses
2027    the selected window.
2028    
2029    The argument @var{max-height} specifies the maximum height the window
2030    is allowed to be; @code{nil} means use the frame height.  The argument
2031    @var{min-height} specifies the minimum height for the window;
2032    @code{nil} means use @code{window-min-height}.  All these height
2033    values include the mode-line and/or header-line.
2034    @end defun
2035    
2036  @deffn Command shrink-window-if-larger-than-buffer &optional window  @deffn Command shrink-window-if-larger-than-buffer &optional window
2037  This command shrinks @var{window} to be as small as possible while still  This command shrinks @var{window} vertically to be as small as
2038  showing the full contents of its buffer---but not less than  possible while still showing the full contents of its buffer---but not
2039  @code{window-min-height} lines.  If @var{window} is not given,  less than @code{window-min-height} lines.  If @var{window} is not
2040  it defaults to the selected window.  given, it defaults to the selected window.
2041    
2042  However, the command does nothing if the window is already too small to  However, the command does nothing if the window is already too small to
2043  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

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79

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