X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=man%2Flispref%2Fwindows.texi;h=b05616e68899fe81f18d8dd086fc072e1bf60ffe;hb=2642da5a0d0e85ad29aacc90fba74aa7855545ee;hp=45ca496817387ba4d1afcfa606e0b42d505c931d;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git.1 diff --git a/man/lispref/windows.texi b/man/lispref/windows.texi index 45ca496..b05616e 100644 --- a/man/lispref/windows.texi +++ b/man/lispref/windows.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the XEmacs Lisp Reference Manual. -@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. @c See the file lispref.texi for copying conditions. @setfilename ../../info/windows.info @node Windows, Frames, Buffers, Top @@ -22,7 +22,7 @@ displayed in windows. * Choosing Window:: How to choose a window for displaying a buffer. * Window Point:: Each window has its own location of point. * Window Start:: The display-start position controls which text - is on-screen in the window. + is on-screen in the window. * Vertical Scrolling:: Moving text up and down in the window. * Horizontal Scrolling:: Moving text sideways on the window. * Size of Window:: Accessing the size of a window. @@ -66,31 +66,31 @@ life. (@xref{Deleting Windows}.) @item containing frame -@item +@item window height -@item +@item window width -@item +@item window edges with respect to the frame or screen -@item +@item the buffer it displays -@item +@item position within the buffer at the upper left of the window -@item +@item amount of horizontal scrolling, in columns -@item +@item point -@item +@item the mark -@item +@item how recently the window was selected @end itemize @@ -139,33 +139,15 @@ but not always: @code{pop-to-buffer} and @code{display-buffer} The two ``halves'' of the split window initially display the same buffer previously visible in the window that was split. -@defun one-window-p &optional no-mini all-frames +@defun one-window-p &optional nomini which-frames which-devices This function returns non-@code{nil} if there is only one window. The -argument @var{no-mini}, if non-@code{nil}, means don't count the +argument @var{nomini}, if non-@code{nil}, means don't count the minibuffer even if it is active; otherwise, the minibuffer window is included, if active, in the total number of windows which is compared against one. - The argument @var{all-frame} controls which set of windows are -counted. -@itemize @bullet -@item -If it is @code{nil} or omitted, then count only the selected frame, plus -the minibuffer it uses (which may be on another frame). -@item -If it is @code{t}, then windows on all frames that currently exist -(including invisible and iconified frames) are counted. -@item -If it is the symbol @code{visible}, then windows on all visible frames -are counted. -@item -If it is the number 0, then windows on all visible and iconified frames -are counted. -@item -If it is any other value, then precisely the windows in @var{window}'s -frame are counted, excluding the minibuffer in use if it lies in -some other frame. -@end itemize +The remaining arguments controls which set of windows are counted, as +with @code{next-window}. @end defun @deffn Command split-window &optional window size horizontal @@ -202,7 +184,7 @@ lines high by 80 columns wide; then the window is split. @group ;; @r{Returns window created} -(setq w2 (split-window w 15)) +(setq w2 (split-window w 15)) @result{} # @end group @group @@ -220,8 +202,8 @@ The frame looks like this: @smallexample @group - __________ - | | line 0 + __________ + | | line 0 | w | |__________| | | line 15 @@ -259,8 +241,8 @@ Now, the screen looks like this: @smallexample @group column 35 - __________ - | | | line 0 + __________ + | | | line 0 | w | w3 | |___|______| | | line 15 @@ -281,7 +263,7 @@ characters; see @ref{Display Tables}. This function splits the selected window into two windows, one above the other, leaving the selected window with @var{size} lines. -This function is simply an interface to @code{split-windows}. +This function is simply an interface to @code{split-window}. Here is the complete function definition for it: @smallexample @@ -298,7 +280,7 @@ Here is the complete function definition for it: This function splits the selected window into two windows side-by-side, leaving the selected window with @var{size} columns. -This function is simply an interface to @code{split-windows}. Here is +This function is simply an interface to @code{split-window}. Here is the complete definition for @code{split-window-horizontally} (except for part of the documentation string): @@ -312,35 +294,6 @@ part of the documentation string): @end smallexample @end deffn -@defun one-window-p &optional no-mini all-frames -This function returns non-@code{nil} if there is only one window. The -argument @var{no-mini}, if non-@code{nil}, means don't count the -minibuffer even if it is active; otherwise, the minibuffer window is -included, if active, in the total number of windows, which is compared -against one. - -The argument @var{all-frames} specifies which frames to consider. Here -are the possible values and their meanings: - -@table @asis -@item @code{nil} -Count the windows in the selected frame, plus the minibuffer used -by that frame even if it lies in some other frame. - -@item @code{t} -Count all windows in all existing frames. - -@item @code{visible} -Count all windows in all visible frames. - -@item 0 -Count all windows in all visible or iconified frames. - -@item anything else -Count precisely the windows in the selected frame, and no others. -@end table -@end defun - @node Deleting Windows @section Deleting Windows @cindex deleting windows @@ -366,15 +319,21 @@ This function returns @code{nil} if @var{window} is deleted, and using a deleted window as if it were live. @end defun -@deffn Command delete-window &optional window -This function removes @var{window} from the display. If @var{window} -is omitted, then the selected window is deleted. An error is signaled -if there is only one window when @code{delete-window} is called. +@deffn Command delete-window &optional window force +This function removes @var{window} from the display. If @var{window} is +omitted, then the selected window is deleted. If window is the only one +on its frame, the frame is deleted as well. + +Normally, you cannot delete the last non-minibuffer-only frame (you must +use @code{save-buffers-kill-emacs} or @code{kill-emacs}); an error is +signaled instead. However, if optional second argument @var{force} is +non-@code{nil}, you can delete the last frame. (This will automatically +call @code{save-buffers-kill-emacs}.) This function returns @code{nil}. -When @code{delete-window} is called interactively, @var{window} -defaults to the selected window. +When @code{delete-window} is called interactively, the selected window +is deleted. @end deffn @deffn Command delete-other-windows &optional window @@ -385,7 +344,7 @@ deleting the other windows in that frame. If @var{window} is omitted or The result is @code{nil}. @end deffn -@deffn Command delete-windows-on buffer &optional frame +@deffn Command delete-windows-on buffer &optional which-frames which-devices This function deletes all windows showing @var{buffer}. If there are no windows showing @var{buffer}, it does nothing. @@ -397,20 +356,52 @@ where there is only one window), then the frame reverts to having a single window showing another buffer chosen with @code{other-buffer}. @xref{The Buffer List}. -The argument @var{frame} controls which frames to operate on: +The argument @var{which-frames} controls which frames to operate on: -@itemize @bullet -@item -If it is @code{nil}, operate on the selected frame. -@item -If it is @code{t}, operate on all frames. -@item -If it is @code{visible}, operate on all visible frames. -@item 0 -If it is 0, operate on all visible or iconified frames. -@item -If it is a frame, operate on that frame. -@end itemize +@table @asis +@item @code{nil} +Delete all windows showing @var{buffer} in any frame. + +@item @code{t} +Delete only windows showing @var{buffer} in the selected frame. + +@item @code{visible} +Delete all windows showing @var{buffer} in any visible frame. + +@item @code{0} +Delete all windows showing @var{buffer} in any visible frame. + +@item @var{frame} +If it is a frame, delete all windows showing @var{buffer} in that frame. +@end table + +@strong{Warning:} This is similar to, but not identical to, the meaning +of the @var{which-frames} argument to @code{next-window}; the meanings +of @code{nil} and @code{t} are reversed. + +The optional argument @var{which-devices} further clarifies on which +devices to search for frames as specified by @var{which-frames}. +This value is only meaningful if @var{which-frames} is not @code{t}. + +@table @asis +@item @code{nil} +Consider all devices on the selected console. + +@item @var{device} +Consider only the one device @var{device}. + +@item @var{console} +Consider all devices on @var{console}. + +@item @var{device-type} +Consider all devices with device type @var{device-type}. + +@item @code{window-system} +Consider all devices on window system consoles. + +@item anything else +Consider all devices without restriction. +@end table This function always returns @code{nil}. @end deffn @@ -438,7 +429,7 @@ appears in @var{window} (on redisplay). The buffer being displayed in If optional argument @var{norecord} is non-@code{nil} then the global and per-frame buffer orderings are not modified, as by the function -@code{record-buffer}. +@code{record-buffer}. The return value is @var{window}. @@ -451,19 +442,18 @@ The return value is @var{window}. @end example @end defun -@defmac save-selected-window forms@dots{} -This macro records the selected window, executes @var{forms} -in sequence, then restores the earlier selected window. -It does not save or restore anything about the sizes, arrangement -or contents of windows; therefore, if the @var{forms} change them, -the changes are permanent. -@end defmac +@defspec save-selected-window forms@dots{} +This special form records the selected window, executes @var{forms} in +sequence, then restores the earlier selected window. It does not save +or restore anything about the sizes, arrangement or contents of windows; +therefore, if the @var{forms} change them, the changes are permanent. +@end defspec @cindex finding windows The following functions choose one of the windows on the screen, offering various criteria for the choice. -@defun get-lru-window &optional frame +@defun get-lru-window &optional which-frames which-devices This function returns the window least recently ``used'' (that is, selected). The selected window is always the most recently used window. @@ -471,23 +461,59 @@ The selected window can be the least recently used window if it is the only window. A newly created window becomes the least recently used window until it is selected. A minibuffer window is never a candidate. -The argument @var{frame} controls which windows are considered. +By default, only the windows in the selected frame are considered. +The optional argument @var{which-frames} changes this behavior. +Here are the possible values and their meanings: + +@table @asis +@item @code{nil} +Consider all the windows in the selected windows's frame, plus the +minibuffer used by that frame even if it lies in some other frame. + +@item @code{t} +Consider all windows in all existing frames. + +@item @code{visible} +Consider all windows in all visible frames. (To get useful results, you +must ensure @var{window} is in a visible frame.) + +@item @code{0} +Consider all windows in all visible or iconified frames. + +@item @var{frame} +Consider all windows on frame @var{frame}. + +@item anything else +Consider precisely the windows in the selected window's frame, and no others. +@end table + +The optional argument @var{which-devices} further clarifies on which +devices to search for frames as specified by @var{which-frames}. +This value is only meaningful if @var{which-frames} is non-@code{nil}. + +@table @asis +@item @code{nil} +Consider all devices on the selected console. + +@item @var{device} +Consider only the one device @var{device}. + +@item @var{console} +Consider all devices on @var{console}. + +@item @var{device-type} +Consider all devices with device type @var{device-type}. + +@item @code{window-system} +Consider all devices on window system consoles. + +@item anything else +Consider all devices without restriction. +@end table -@itemize @bullet -@item -If it is @code{nil}, consider windows on the selected frame. -@item -If it is @code{t}, consider windows on all frames. -@item -If it is @code{visible}, consider windows on all visible frames. -@item -If it is 0, consider windows on all visible or iconified frames. -@item -If it is a frame, consider windows on that frame. -@end itemize @end defun -@defun get-largest-window &optional frame +@defun get-largest-window &optional which-frames which-devices This function returns the window with the largest area (height times width). If there are no side-by-side windows, then this is the window with the most lines. A minibuffer window is never a candidate. @@ -496,15 +522,15 @@ If there are two windows of the same size, then the function returns the window that is first in the cyclic ordering of windows (see following section), starting from the selected window. -The argument @var{frame} controls which set of windows are -considered. See @code{get-lru-window}, above. +The remaining arguments control which set of windows are considered. +See @code{next-window}, above. @end defun @node Cyclic Window Ordering @section Cyclic Ordering of Windows @cindex cyclic ordering of windows @cindex ordering of windows, cyclic -@cindex window ordering, cyclic +@cindex window ordering, cyclic When you use the command @kbd{C-x o} (@code{other-window}) to select the next window, it moves through all the windows on the screen in a @@ -523,7 +549,7 @@ horizontal, the ordering is top to bottom in the left part, and so on. In general, within each set of siblings at any level in the window tree, the order is left to right, or top to bottom. -@defun next-window &optional window minibuf all-frames +@defun next-window &optional window minibuf which-frames which-devices @cindex minibuffer window This function returns the window following @var{window} in the cyclic ordering of windows. This is the window that @kbd{C-x o} would select @@ -543,8 +569,9 @@ minibuffer window even if it is not active. If @var{minibuf} is neither @code{t} nor @code{nil}, then the minibuffer window is not included even if it is active. -The argument @var{all-frames} specifies which frames to consider. Here -are the possible values and their meanings: +By default, only the windows in the selected frame are considered. +The optional argument @var{which-frames} changes this behavior. +Here are the possible values and their meanings: @table @asis @item @code{nil} @@ -558,14 +585,47 @@ Consider all windows in all existing frames. Consider all windows in all visible frames. (To get useful results, you must ensure @var{window} is in a visible frame.) -@item 0 +@item @code{0} Consider all windows in all visible or iconified frames. +@item @var{frame} +Consider all windows on frame @var{frame}. + @item anything else Consider precisely the windows in @var{window}'s frame, and no others. @end table -This example assumes there are two windows, both displaying the +The optional argument @var{which-devices} further clarifies on which +devices to search for frames as specified by @var{which-frames}. +This value is only meaningful if @var{which-frames} is non-@code{nil}. + +@table @asis +@item @code{nil} +Consider all devices on the selected console. + +@item @var{device} +Consider only the one device @var{device}. + +@item @var{console} +Consider all devices on @var{console}. + +@item @var{device-type} +Consider all devices with device type @var{device-type}. + +@item @code{window-system} +Consider all devices on window system consoles. + +@item anything else +Consider all devices without restriction. +@end table + +If you use consistent values for @var{minibuf}, @var{which-frames}, and +@var{which-devices}, you can use @code{next-window} to iterate through the +entire cycle of acceptable windows, eventually ending up back at the +window you started with. @code{previous-window} traverses the same +cycle, in the reverse order. + +This example assumes there are two windows, both displaying the buffer @samp{windows.texi}: @example @@ -584,48 +644,29 @@ buffer @samp{windows.texi}: @end example @end defun -@defun previous-window &optional window minibuf all-frames +@defun previous-window &optional window minibuf which-frames which-devices This function returns the window preceding @var{window} in the cyclic ordering of windows. The other arguments specify which windows to include in the cycle, as in @code{next-window}. @end defun -@deffn Command other-window count &optional frame -This function selects the @var{count}th following window in the cyclic -order. If count is negative, then it selects the @minus{}@var{count}th +@deffn Command other-window count &optional which-frames which-devices +This function selects the @var{count}th following window in the cyclic order. +If @var{count} is negative, then it selects the @minus{}@var{count}th preceding window. It returns @code{nil}. In an interactive call, @var{count} is the numeric prefix argument. -The argument @var{frame} controls which set of windows are considered. -@itemize @bullet -@item -If it is @code{nil} or omitted, then windows on the selected frame are -considered. -@item -If it is a frame, then windows on that frame are considered. -@item -If it is @code{t}, then windows on all frames that currently exist -(including invisible and iconified frames) are considered. -@item -If it is the symbol @code{visible}, then windows on all visible frames -are considered. -@item -If it is the number 0, then windows on all visible and iconified frames -are considered. -@item -If it is any other value, then the behavior is undefined. -@end itemize +The other arguments specify which windows to include in the cycle, as in +@code{next-window}. @end deffn -@c Emacs 19 feature -@defun walk-windows proc &optional minibuf all-frames -This function cycles through all windows, calling @code{proc} +@defun walk-windows function &optional minibuf which-frames which-devices +This function cycles through all windows, calling @code{function} once for each window with the window as its sole argument. -The optional arguments @var{minibuf} and @var{all-frames} specify the -set of windows to include in the scan. See @code{next-window}, above, -for details. +The other arguments specify which windows to cycle through, as in +@code{next-window}. @end defun @node Buffers and Windows @@ -647,9 +688,14 @@ The functions described there are easier to use than these, but they employ heuristics in choosing or creating a window; use these functions when you need complete control. -@defun set-window-buffer window buffer-or-name +@defun set-window-buffer window buffer-or-name &optional norecord This function makes @var{window} display @var{buffer-or-name} as its -contents. It returns @code{nil}. +contents. @var{buffer-or-name} can be a buffer or a buffer name. + +With non-@code{nil} optional argument @var{norecord}, do not modify the +global or per-frame buffer ordering. + +This function returns @code{nil}. @example @group @@ -672,27 +718,15 @@ selected window. @end example @end defun -@defun get-buffer-window buffer-or-name &optional frame +@defun get-buffer-window buffer-or-name &optional which-frames which-devices This function returns a window currently displaying @var{buffer-or-name}, or @code{nil} if there is none. If there are several such windows, then the function returns the first one in the cyclic ordering of windows, starting from the selected window. @xref{Cyclic Window Ordering}. -The argument @var{all-frames} controls which windows to consider. - -@itemize @bullet -@item -If it is @code{nil}, consider windows on the selected frame. -@item -If it is @code{t}, consider windows on all frames. -@item -If it is @code{visible}, consider windows on all visible frames. -@item -If it is 0, consider windows on all visible or iconified frames. -@item -If it is a frame, consider windows on that frame. -@end itemize +The remaining arguments control which windows to consider. They have +the same meaning as for @code{next-window}. @end defun @node Displaying Buffers @@ -801,13 +835,16 @@ buffer on. Functions}. @end defun -@deffn Command replace-buffer-in-windows buffer +@deffn Command replace-buffer-in-windows buffer &optional which-frames which-devices This function replaces @var{buffer} with some other buffer in all windows displaying it. The other buffer used is chosen with @code{other-buffer}. In the usual applications of this function, you don't care which other buffer is used; you just want to make sure that @var{buffer} is no longer displayed. +The optional arguments @var{which-frames} and @var{which-devices} have +the same meaning as with @code{delete-windows-on}. + This function returns @code{nil}. @end deffn @@ -819,12 +856,14 @@ display a buffer in---@code{display-buffer}. All the higher-level functions and commands use this subroutine. Here we describe how to use @code{display-buffer} and how to customize it. -@deffn Command display-buffer buffer-or-name &optional not-this-window +@deffn Command display-buffer buffer-or-name &optional not-this-window override-frame This command makes @var{buffer-or-name} appear in some window, like @code{pop-to-buffer}, but it does not select that window and does not make the buffer current. The identity of the selected window is unaltered by this function. +@var{buffer-or-name} can be a buffer or the name of one. + If @var{not-this-window} is non-@code{nil}, it means to display the specified buffer in a window other than the selected one, even if it is already on display in the selected window. This can cause the buffer to @@ -832,8 +871,10 @@ appear in two windows at once. Otherwise, if @var{buffer-or-name} is already being displayed in any window, that is good enough, so this function does nothing. -@code{display-buffer} returns the window chosen to display -@var{buffer-or-name}. +If @var{override-frame} is non-@code{nil}, display on that frame instead +of the current frame (or the dedicated frame). + +@code{display-buffer} returns the window chosen to display @var{buffer-or-name}. Precisely how @code{display-buffer} finds or creates a window depends on the variables described below. @@ -1039,13 +1080,14 @@ point and the buffer's point always move together; they remain equal. when the user switches to another buffer, the cursor jumps to the position of point in that buffer. -@defun window-point window +@defun window-point &optional window This function returns the current position of point in @var{window}. -For a nonselected window, this is the value point would have (in that +For a non-selected window, this is the value point would have (in that window's buffer) if that window were selected. When @var{window} is the selected window and its buffer is also the -current buffer, the value returned is the same as point in that buffer. +current buffer, the value returned is the same as the value of point in +that buffer. Strictly speaking, it would be more correct to return the ``top-level'' value of point, outside of any @code{save-excursion} @@ -1071,7 +1113,7 @@ inevitably, at the beginning of a text line. @cindex window top line This function returns the display-start position of window @var{window}. If @var{window} is @code{nil}, the selected window is -used. For example, +used. For example, @example @group @@ -1088,19 +1130,25 @@ For a realistic example, see the description of @code{count-lines} in @ref{Text Lines}. @end defun -@defun window-end &optional window +@defun window-end &optional window guarantee This function returns the position of the end of the display in window @var{window}. If @var{window} is @code{nil}, the selected window is used. -Simply changing the buffer text or moving point does not update the -value that @code{window-end} returns. The value is updated only when -Emacs redisplays and redisplay actually finishes. +Simply changing the buffer text or setting @code{window-start} does not +update the value that @code{window-end} returns. The value is updated +only when Emacs redisplays and redisplay actually finishes. If the last redisplay of @var{window} was preempted, and did not finish, Emacs does not know the position of the end of display in that window. In that case, this function returns a value that is not correct. In a future version, @code{window-end} will return @code{nil} in that case. + +If optional arg @var{guarantee} is non-@code{nil}, the return value is +guaranteed to be the same as @code{window-end} would return at the end +of the next full redisplay assuming nothing else changes in the +meantime. This function is potentially much slower with this flag set. + @ignore in that case, this function returns @code{nil}. You can compute where the end of the window @emph{would} have been, if redisplay had finished, @@ -1229,33 +1277,33 @@ names that fit the user's point of view. unpredictable results if the current buffer is different from the buffer that is displayed in the selected window. @xref{Current Buffer}. -@deffn Command scroll-up &optional count +@deffn Command scroll-up &optional lines This function scrolls the text in the selected window upward -@var{count} lines. If @var{count} is negative, scrolling is actually +@var{lines} lines. If @var{lines} is negative, scrolling is actually downward. -If @var{count} is @code{nil} (or omitted), then the length of scroll +If @var{lines} is @code{nil} (or omitted), then the length of scroll is @code{next-screen-context-lines} lines less than the usable height of the window (not counting its modeline). @code{scroll-up} returns @code{nil}. @end deffn -@deffn Command scroll-down &optional count +@deffn Command scroll-down &optional lines This function scrolls the text in the selected window downward -@var{count} lines. If @var{count} is negative, scrolling is actually +@var{lines} lines. If @var{lines} is negative, scrolling is actually upward. -If @var{count} is omitted or @code{nil}, then the length of the scroll +If @var{lines} is omitted or @code{nil}, then the length of the scroll is @code{next-screen-context-lines} lines less than the usable height of the window (not counting its mode line). @code{scroll-down} returns @code{nil}. @end deffn -@deffn Command scroll-other-window &optional count -This function scrolls the text in another window upward @var{count} -lines. Negative values of @var{count}, or @code{nil}, are handled +@deffn Command scroll-other-window &optional lines +This function scrolls the text in another window upward @var{lines} +lines. Negative values of @var{lines}, or @code{nil}, are handled as in @code{scroll-up}. You can specify a buffer to scroll with the variable @@ -1305,26 +1353,27 @@ bottom of the window appear instead at the top. The default value is @code{2}. @end defopt -@deffn Command recenter &optional count +@deffn Command recenter &optional location window @cindex centering point -This function scrolls the selected window to put the text where point -is located at a specified vertical position within the window. +This function scrolls @var{window} (which defaults to the selected +window) to put the text where point is located at a specified vertical +position within the window. -If @var{count} is a nonnegative number, it puts the line containing -point @var{count} lines down from the top of the window. If @var{count} +If @var{location} is a nonnegative number, it puts the line containing +point @var{location} lines down from the top of the window. If @var{location} is a negative number, then it counts upward from the bottom of the window, so that @minus{}1 stands for the last usable line in the window. -If @var{count} is a non-@code{nil} list, then it stands for the line in +If @var{location} is a non-@code{nil} list, then it stands for the line in the middle of the window. -If @var{count} is @code{nil}, @code{recenter} puts the line containing +If @var{location} is @code{nil}, @code{recenter} puts the line containing point in the middle of the window, then clears and redisplays the entire selected frame. -When @code{recenter} is called interactively, @var{count} is the raw +When @code{recenter} is called interactively, @var{location} is the raw prefix argument. Thus, typing @kbd{C-u} as the prefix sets the -@var{count} to a non-@code{nil} list, while typing @kbd{C-u 4} sets -@var{count} to 4, which positions the current line four lines from the +@var{location} to a non-@code{nil} list, while typing @kbd{C-u 4} sets +@var{location} to 4, which positions the current line four lines from the top. With an argument of zero, @code{recenter} positions the current line at @@ -1336,10 +1385,10 @@ separate key binding to do this. For example, (defun line-to-top-of-window () "Scroll current line to top of window. Replaces three keystroke sequence C-u 0 C-l." - (interactive) + (interactive) (recenter 0)) -(global-set-key [kp-multiply] 'line-to-top-of-window) +(global-set-key [kp-multiply] 'line-to-top-of-window) @end group @end example @end deffn @@ -1368,14 +1417,14 @@ far as to reduce the net horizontal scroll to zero. There is no limit to how far left you can scroll, but eventually all the text will disappear off the left edge. -@deffn Command scroll-left count +@deffn Command scroll-left &optional count This function scrolls the selected window @var{count} columns to the left (or to the right if @var{count} is negative). The return value is the total amount of leftward horizontal scrolling in effect after the change---just like the value returned by @code{window-hscroll} (below). @end deffn -@deffn Command scroll-right count +@deffn Command scroll-right &optional count This function scrolls the selected window @var{count} columns to the right (or to the left if @var{count} is negative). The return value is the total amount of leftward horizontal scrolling in effect after the @@ -1433,9 +1482,9 @@ is off the screen due to horizontal scrolling: @example @group (defun hscroll-on-screen (window position) - (save-excursion + (save-excursion (goto-char position) - (and + (and (>= (- (current-column) (window-hscroll window)) 0) (< (- (current-column) (window-hscroll window)) (window-width window))))) @@ -1590,7 +1639,7 @@ and divider, if any, is not counted. This function returns the height in pixels of the text displayed in @var{window}, which defaults to the selected window. Unlike @code{window-text-area-pixel-height}, any blank space below the -end of the buffer is not included. If optional argument @var{noclipped} +end of the buffer is not included. If optional argument @var{noclipped} is non-@code{nil}, any space occupied by clipped lines will not be included. @end defun @@ -1611,20 +1660,20 @@ used. The order of the list is @code{(@var{left} @var{top} @var{right} @var{bottom})}, all elements relative to 0, 0 at the top left corner of -the frame. The element @var{right} of the value is one more than the -rightmost pixel used by @var{window} (including any left margin, right -margin, or vertical scrollbar displayed alongside it), and +@var{window}'s frame. The element @var{right} of the value is one more +than the rightmost pixel used by @var{window} (including any left +margin, right margin, or vertical scrollbar displayed alongside it), and @var{bottom} is one more than the bottommost pixel used by @var{window} -(including any modeline or horizontal scrollbar displayed above -or below it). The frame area does not include any frame menubars or -toolbars that may be displayed; thus, for example, if there is only -one window on the frame, the values for @var{left} and @var{top} will -always be 0. +(including any modeline or horizontal scrollbar displayed above or below +it). The frame area does not include any frame menubars, toolbars, or +gutters that may be displayed; thus, for example, if there is only one +window on the frame, the values for @var{left} and @var{top} will always +be 0. If @var{window} is at the upper left corner of its frame, @var{right} and @var{bottom} are the same as the values returned by @code{(window-pixel-width)} and @code{(window-pixel-height)} -respectively, and @var{top} and @var{bottom} are zero. +respectively, and @var{left} and @var{top} are zero. @end defun There is no longer a function @code{window-edges} because it does not @@ -1660,15 +1709,15 @@ that change the size of windows and low-level functions that access window size. XEmacs does not permit overlapping windows or gaps between windows, so resizing one window affects other windows. -@deffn Command enlarge-window size &optional horizontal window -This function makes the selected window @var{size} lines taller, +@deffn Command enlarge-window count &optional horizontal window +This function makes the selected window @var{count} lines taller, stealing lines from neighboring windows. It takes the lines from one window at a time until that window is used up, then takes from another. If a window from which lines are stolen shrinks below @code{window-min-height} lines, that window disappears. If @var{horizontal} is non-@code{nil}, this function makes -@var{window} wider by @var{size} columns, stealing columns instead of +@var{window} wider by @var{count} columns, stealing columns instead of lines. If a window from which columns are stolen shrinks below @code{window-min-width} columns, that window disappears. @@ -1676,15 +1725,15 @@ If the requested size would exceed that of the window's frame, then the function makes the window occupy the entire height (or width) of the frame. -If @var{size} is negative, this function shrinks the window by -@minus{}@var{size} lines or columns. If that makes the window smaller +If @var{count} is negative, this function shrinks the window by +@minus{}@var{count} lines or columns. If that makes the window smaller than the minimum size (@code{window-min-height} and @code{window-min-width}), @code{enlarge-window} deletes the window. If @var{window} is non-@code{nil}, it specifies a window to change instead of the selected window. -@code{enlarge-window} returns @code{nil}. +@code{enlarge-window} returns @code{nil}. @end deffn @deffn Command enlarge-window-horizontally columns @@ -1700,20 +1749,20 @@ It could be defined as follows: @end deffn @deffn Command enlarge-window-pixels count &optional side window -This function makes the selected window @var{count} pixels larger. When -called from Lisp, optional second argument @var{side} non-@code{nil} -means to grow sideways @var{count} pixels, and optional third argument -@var{window} specifies the window to change instead of the selected -window. +This function makes the selected window @var{count} pixels larger. +When called from Lisp, optional second argument @var{side} +non-@code{nil} means to grow sideways @var{count} pixels, and optional +third argument @var{window} specifies the window to change instead of +the selected window. @end deffn -@deffn Command shrink-window size &optional horizontal window +@deffn Command shrink-window count &optional horizontal window This function is like @code{enlarge-window} but negates the argument -@var{size}, making the selected window smaller by giving lines (or +@var{count}, making the selected window smaller by giving lines (or columns) to the other windows. If the window shrinks below @code{window-min-height} or @code{window-min-width}, then it disappears. -If @var{size} is negative, the window is enlarged by @minus{}@var{size} +If @var{count} is negative, the window is enlarged by @minus{}@var{count} lines or columns. If @var{window} is non-@code{nil}, it specifies a window to change @@ -1800,13 +1849,15 @@ configuration previously saved. configuration instead of a window configuration. @xref{Frame Configurations}. -@defun current-window-configuration -This function returns a new object representing XEmacs's current window -configuration, namely the number of windows, their sizes and current -buffers, which window is the selected window, and for each window the -displayed buffer, the display-start position, and the positions of point -and the mark. An exception is made for point in the current buffer, -whose value is not saved. +@defun current-window-configuration &optional frame +This function returns a new object representing the current current +window configuration of @var{frame}, namely the number of windows, their +sizes and current buffers, which window is the selected window, and for +each window the displayed buffer, the display-start position, and the +positions of point and the mark. An exception is made for point in the +current buffer, whose value is not saved. + +@var{frame} defaults to the selected frame. @end defun @defun set-window-configuration configuration