comparison doc/lispref/windows.texi @ 99465:3bf4c25d3b4b

(Basic Windows, Splitting Windows) (Deleting Windows, Selecting Windows, Cyclic Window Ordering) (Buffers and Windows, Displaying Buffers, Dedicated Windows) (Resizing Windows, Window Configurations, Window Parameters): Fix wording and markup.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 08 Nov 2008 18:06:56 +0000
parents 910601b61dec
children ecad25300f20
comparison
equal deleted inserted replaced
99464:6aa6a39cd1cd 99465:3bf4c25d3b4b
21 * Buffers and Windows:: Each window displays the contents of a buffer. 21 * Buffers and Windows:: Each window displays the contents of a buffer.
22 * Displaying Buffers:: Higher-level functions for displaying a buffer 22 * Displaying Buffers:: Higher-level functions for displaying a buffer
23 and choosing a window for it. 23 and choosing a window for it.
24 * Choosing Window:: How to choose a window for displaying a buffer. 24 * Choosing Window:: How to choose a window for displaying a buffer.
25 * Dedicated Windows:: How to avoid displaying another buffer in 25 * Dedicated Windows:: How to avoid displaying another buffer in
26 a specific window. 26 a specific window.
27 * Window Point:: Each window has its own location of point. 27 * Window Point:: Each window has its own location of point.
28 * Window Start and End:: Buffer positions indicating which text is 28 * Window Start and End:: Buffer positions indicating which text is
29 on-screen in a window. 29 on-screen in a window.
30 * Textual Scrolling:: Moving text up and down through the window. 30 * Textual Scrolling:: Moving text up and down through the window.
31 * Vertical Scrolling:: Moving the contents up and down on the window. 31 * Vertical Scrolling:: Moving the contents up and down on the window.
49 A @dfn{window} in Emacs is the physical area of the screen in which a 49 A @dfn{window} in Emacs is the physical area of the screen in which a
50 buffer is displayed. The term is also used to refer to a Lisp object that 50 buffer is displayed. The term is also used to refer to a Lisp object that
51 represents that screen area in Emacs Lisp. It should be 51 represents that screen area in Emacs Lisp. It should be
52 clear from the context which is meant. 52 clear from the context which is meant.
53 53
54 Emacs groups windows into frames, @xref{Frames}. A frame represents 54 Emacs groups windows into frames, see @ref{Frames}. A frame
55 an area of screen available for Emacs to use. Each frame always 55 represents an area of screen available for Emacs to use. Each frame
56 contains at least one window, but you can subdivide it vertically or 56 always contains at least one window, but you can subdivide it
57 horizontally into multiple, nonoverlapping Emacs windows. 57 vertically or horizontally into multiple, nonoverlapping Emacs
58 windows.
58 59
59 In each frame, at any time, one and only one window is designated as 60 In each frame, at any time, one and only one window is designated as
60 @dfn{selected within the frame}. The frame's cursor appears in that 61 @dfn{selected within the frame}. The frame's cursor appears in that
61 window, but the other windows have ``non-selected'' cursors, normally 62 window, but the other windows have ``non-selected'' cursors, normally
62 less visible. (@pxref{Cursor Parameters}, for customizing this.) At 63 less visible. (@xref{Cursor Parameters}, for customizing this.) At
63 any time, one frame is the selected frame; and the window selected 64 any time, one frame is the selected frame; and the window selected
64 within that frame is @dfn{the selected window}. The selected window's 65 within that frame is @dfn{the selected window}. The selected window's
65 buffer is usually the current buffer (except when @code{set-buffer} has 66 buffer is usually the current buffer (except when @code{set-buffer} has
66 been used), @xref{Current Buffer}. 67 been used), see @ref{Current Buffer}.
67 68
68 For practical purposes, a window exists only while it is displayed in 69 For practical purposes, a window exists only while it is displayed in
69 a frame. Once removed from the frame, the window is effectively deleted 70 a frame. Once removed from the frame, the window is effectively deleted
70 and should not be used, @emph{even though there may still be references 71 and should not be used, @emph{even though there may still be references
71 to it} from other Lisp objects, @xref{Deleting Windows}. Restoring a 72 to it} from other Lisp objects, see @ref{Deleting Windows}. Restoring a
72 saved window configuration is the only way for a window no longer on the 73 saved window configuration is the only way for a window no longer on the
73 screen to come back to life, @xref{Window Configurations}. 74 screen to come back to life, see @ref{Window Configurations}.
74 75
75 @cindex multiple windows 76 @cindex multiple windows
76 Users create multiple windows so they can look at several buffers at 77 Users create multiple windows so they can look at several buffers at
77 once. Lisp libraries use multiple windows for a variety of reasons, but 78 once. Lisp libraries use multiple windows for a variety of reasons, but
78 most often to display related information. In Rmail, for example, you 79 most often to display related information. In Rmail, for example, you
215 column 0 column 80 216 column 0 column 80
216 @end group 217 @end group
217 @end smallexample 218 @end smallexample
218 219
219 Normally, Emacs indicates the border between two side-by-side windows 220 Normally, Emacs indicates the border between two side-by-side windows
220 with a scroll bar, @xref{Scroll Bars}, or @samp{|} characters. The 221 with a scroll bar (@pxref{Scroll Bars}), or with @samp{|} characters. The
221 display table can specify alternative border characters; @xref{Display 222 display table can specify alternative border characters; see @ref{Display
222 Tables}. 223 Tables}.
223 @end deffn 224 @end deffn
224 225
225 @deffn Command split-window-vertically &optional size 226 @deffn Command split-window-vertically &optional size
226 This function splits the selected window into two windows, one above the 227 This function splits the selected window into two windows, one above the
312 there are no references to it. There is no way to cancel the deletion 313 there are no references to it. There is no way to cancel the deletion
313 of a window aside from restoring a saved window configuration 314 of a window aside from restoring a saved window configuration
314 (@pxref{Window Configurations}). Restoring a window configuration also 315 (@pxref{Window Configurations}). Restoring a window configuration also
315 deletes any windows that aren't part of that configuration. 316 deletes any windows that aren't part of that configuration.
316 317
317 When you delete a window, the space it took up is given to one 318 When you delete a window, the space it took up is given to one of
318 adjacent window. 319 its sibling windows adjacent to it.
319 320
320 @c Emacs 19 feature 321 @c Emacs 19 feature
321 @defun window-live-p window 322 @defun window-live-p window
322 This function returns @code{nil} if @var{window} is deleted, and 323 This function returns @code{nil} if @var{window} is deleted, and
323 @code{t} otherwise. 324 @code{t} otherwise.
389 which the cursor appears and to which many commands apply. 390 which the cursor appears and to which many commands apply.
390 @end defun 391 @end defun
391 392
392 @defun select-window window &optional norecord 393 @defun select-window window &optional norecord
393 This function makes @var{window} the selected window. The cursor then 394 This function makes @var{window} the selected window. The cursor then
394 appears in @var{window} (on redisplay). Unless @var{window} was already 395 appears in @var{window} (after redisplay). Unless @var{window} was
395 selected, @code{select-window} makes @var{window}'s buffer the current 396 already selected, @code{select-window} makes @var{window}'s buffer the
396 buffer. The return value is @var{window}. 397 current buffer. The return value is @var{window}.
397 398
398 Normally, @var{window}'s selected buffer is moved to the front of the 399 Normally, @var{window}'s selected buffer is moved to the front of the
399 buffer list (@pxref{The Buffer List}) and @var{window} becomes the most 400 buffer list (@pxref{The Buffer List}) and @var{window} becomes the most
400 recently selected window. But if @var{norecord} is non-@code{nil}, the 401 recently selected window. But if @var{norecord} is non-@code{nil}, the
401 buffer list remains unchanged and @var{window} does not become the most 402 buffer list remains unchanged and @var{window} does not become the most
416 of each frame, executes @var{forms} in sequence, then restores the 417 of each frame, executes @var{forms} in sequence, then restores the
417 earlier selected frame and windows. It also saves and restores the 418 earlier selected frame and windows. It also saves and restores the
418 current buffer. It returns the value of the last form in @var{forms}. 419 current buffer. It returns the value of the last form in @var{forms}.
419 420
420 This macro does not save or restore anything about the sizes, 421 This macro does not save or restore anything about the sizes,
421 arrangement or contents of windows; therefore, if the @var{forms} change 422 arrangement or contents of windows; therefore, if @var{forms} change
422 them, the change persists. If the previously selected window of some 423 them, the change persists. If the previously selected window of some
423 frame is no longer live at the time of exit from @var{forms}, that 424 frame is no longer live at the time of exit from @var{forms}, that
424 frame's selected window is left alone. If the previously selected 425 frame's selected window is left alone. If the previously selected
425 window is no longer live, then whatever window is selected at the end of 426 window is no longer live, then whatever window is selected at the end of
426 @var{forms} remains selected. The current buffer is restored if and 427 @var{forms} remains selected. The current buffer is restored if and
433 @defmac with-selected-window window forms@dots{} 434 @defmac with-selected-window window forms@dots{}
434 This macro selects @var{window}, executes @var{forms} in sequence, then 435 This macro selects @var{window}, executes @var{forms} in sequence, then
435 restores the previously selected window and current buffer. The ordering 436 restores the previously selected window and current buffer. The ordering
436 of recently selected windows and the buffer list remain unchanged unless 437 of recently selected windows and the buffer list remain unchanged unless
437 you deliberately change them within @var{forms}, for example, by calling 438 you deliberately change them within @var{forms}, for example, by calling
438 @code{select-window} with argument @var{norecord} nil or omitted there. 439 @code{select-window} with argument @var{norecord} @code{nil} or omitted
440 there.
439 @end defmac 441 @end defmac
440 442
441 @cindex finding windows 443 @cindex finding windows
442 The following functions choose one of the windows on the screen, 444 The following functions choose one of the windows on the screen,
443 offering various criteria for the choice. 445 offering various criteria for the choice.
450 The selected window can be the least recently used window if it is the 452 The selected window can be the least recently used window if it is the
451 only window. A newly created window becomes the least recently used 453 only window. A newly created window becomes the least recently used
452 window until it is selected. A minibuffer window is never a candidate. 454 window until it is selected. A minibuffer window is never a candidate.
453 A dedicated window (@pxref{Dedicated Windows}) is never a candidate 455 A dedicated window (@pxref{Dedicated Windows}) is never a candidate
454 unless the @var{dedicated} argument is non-@code{nil}, so if all 456 unless the @var{dedicated} argument is non-@code{nil}, so if all
455 existing windows are dedicated, the value is @code{nil}. 457 existing windows are dedicated, the function returns @code{nil}.
456 458
457 The argument @var{frame} specifies which windows are considered. 459 The argument @var{frame} specifies which windows are considered.
458 460
459 @itemize @bullet 461 @itemize @bullet
460 @item 462 @item
474 This function returns the window with the largest area (height times 476 This function returns the window with the largest area (height times
475 width). If there are no side-by-side windows, then this is the window 477 width). If there are no side-by-side windows, then this is the window
476 with the most lines. A minibuffer window is never a candidate. A 478 with the most lines. A minibuffer window is never a candidate. A
477 dedicated window (@pxref{Dedicated Windows}) is never a candidate unless 479 dedicated window (@pxref{Dedicated Windows}) is never a candidate unless
478 the @var{dedicated} argument is non-@code{nil}, so if all existing 480 the @var{dedicated} argument is non-@code{nil}, so if all existing
479 windows are dedicated, the value is @code{nil}. 481 windows are dedicated, the function returns @code{nil}.
480 482
481 If there are two candidate windows of the same size, this function 483 If there are two candidate windows of the same size, this function
482 prefers the one that comes first in the cyclic ordering of windows 484 prefers the one that comes first in the cyclic ordering of windows,
483 starting from the selected window (@pxref{Cyclic Window Ordering}). 485 starting from the selected window (@pxref{Cyclic Window Ordering}).
484 486
485 The argument @var{frame} specifies which set of windows to consider, see 487 The argument @var{frame} specifies which set of windows to consider, see
486 @code{get-lru-window} above. 488 @code{get-lru-window} above.
487 @end defun 489 @end defun
534 536
535 The value of the argument @var{minibuf} specifies whether the minibuffer 537 The value of the argument @var{minibuf} specifies whether the minibuffer
536 is included in the window order. Normally, when @var{minibuf} is 538 is included in the window order. Normally, when @var{minibuf} is
537 @code{nil}, the minibuffer is included only if it is currently 539 @code{nil}, the minibuffer is included only if it is currently
538 ``active''; this matches the behavior of @kbd{C-x o}. (The minibuffer 540 ``active''; this matches the behavior of @kbd{C-x o}. (The minibuffer
539 window is active while the minibuffer is in use, @xref{Minibuffers}.) 541 window is active while the minibuffer is in use, see @ref{Minibuffers}.)
540 542
541 If @var{minibuf} is @code{t}, the cyclic ordering includes the 543 If @var{minibuf} is @code{t}, the cyclic ordering includes the
542 minibuffer window even if it is not active. If @var{minibuf} is neither 544 minibuffer window even if it is not active. If @var{minibuf} is neither
543 @code{t} nor @code{nil}, the minibuffer window is not included even if 545 @code{t} nor @code{nil}, the minibuffer window is not included even if
544 it is active. 546 it is active.
622 @end defun 624 @end defun
623 625
624 @defun window-list &optional frame minibuf window 626 @defun window-list &optional frame minibuf window
625 This function returns a list of all windows on @var{frame}, starting 627 This function returns a list of all windows on @var{frame}, starting
626 with @var{window}. @var{frame} defaults to the selected frame; 628 with @var{window}. @var{frame} defaults to the selected frame;
627 @var{window} to the selected window. 629 @var{window} defaults to the selected window.
628 630
629 The value of @var{minibuf} specifies if the minibuffer window shall be 631 The value of @var{minibuf} specifies if the minibuffer window shall be
630 included in the result list. If @var{minibuf} is @code{t}, the result 632 included in the result list. If @var{minibuf} is @code{t}, the result
631 always includes the minibuffer window. If @var{minibuf} is @code{nil} 633 always includes the minibuffer window. If @var{minibuf} is @code{nil}
632 or omitted, that includes the minibuffer window if it is active. If 634 or omitted, that includes the minibuffer window if it is active. If
667 @end group 669 @end group
668 @end example 670 @end example
669 671
670 Normally, displaying @var{buffer-or-name} in @var{window} resets the 672 Normally, displaying @var{buffer-or-name} in @var{window} resets the
671 window's position, display margins, fringe widths, and scroll bar 673 window's position, display margins, fringe widths, and scroll bar
672 settings, to values based on the local variables of that buffer. 674 settings based on the local variables of that buffer.
673 However, if @var{keep-margins} is non-@code{nil}, display margins and 675 However, if @var{keep-margins} is non-@code{nil}, display margins and
674 fringe widths of @var{window} remain unchanged. @xref{Fringes}. 676 fringe widths of @var{window} remain unchanged. @xref{Fringes}.
675 677
676 This function signals an error when @var{window} is @dfn{strongly} 678 This function signals an error when @var{window} is @dfn{strongly}
677 dedicated to its buffer (@pxref{Dedicated Windows}) and does not already 679 dedicated to its buffer (@pxref{Dedicated Windows}) and does not already
780 This function makes @var{buffer-or-name} the current buffer, and also 782 This function makes @var{buffer-or-name} the current buffer, and also
781 displays the buffer in the selected window. This means that a human can 783 displays the buffer in the selected window. This means that a human can
782 see the buffer and subsequent keyboard commands will apply to it. 784 see the buffer and subsequent keyboard commands will apply to it.
783 Contrast this with @code{set-buffer}, which makes @var{buffer-or-name} 785 Contrast this with @code{set-buffer}, which makes @var{buffer-or-name}
784 the current buffer but does not display it in the selected window, 786 the current buffer but does not display it in the selected window,
785 @xref{Current Buffer}. 787 see @ref{Current Buffer}.
786 788
787 If @var{buffer-or-name} is @code{nil}, @code{switch-to-buffer} chooses a 789 If @var{buffer-or-name} is @code{nil}, @code{switch-to-buffer} chooses a
788 buffer using @code{other-buffer}. If @var{buffer-or-name} is a string 790 buffer using @code{other-buffer}. If @var{buffer-or-name} is a string
789 that does not identify an existing buffer, then a new buffer by that 791 that does not identify an existing buffer, then a new buffer by that
790 name is created. The major mode for the new buffer is set according to 792 name is created. The major mode for the new buffer is set according to
791 the variable @code{default-major-mode}, @xref{Auto Major Mode}. 793 the variable @code{default-major-mode}, see @ref{Auto Major Mode}.
792 794
793 When @code{enable-recursive-minibuffers} is non-@code{nil} and the 795 When @code{enable-recursive-minibuffers} is non-@code{nil} and the
794 selected window is either the minibuffer window or is dedicated to its 796 selected window is either the minibuffer window or is dedicated to its
795 buffer (@pxref{Dedicated Windows}), @code{switch-to-buffer} calls 797 buffer (@pxref{Dedicated Windows}), @code{switch-to-buffer} calls
796 @code{pop-to-buffer} (see below) to display the buffer in some other 798 @code{pop-to-buffer} (see below) to display the buffer in some other
827 829
828 @deffn Command pop-to-buffer buffer-or-name &optional other-window norecord 830 @deffn Command pop-to-buffer buffer-or-name &optional other-window norecord
829 This command makes @var{buffer-or-name} the current buffer and switches 831 This command makes @var{buffer-or-name} the current buffer and switches
830 to it in some window, preferably not the window previously selected. 832 to it in some window, preferably not the window previously selected.
831 The ``popped-to'' window becomes the selected window. Its frame is 833 The ``popped-to'' window becomes the selected window. Its frame is
832 given the X server's focus, if possible, @xref{Input Focus}. The return 834 given the X server's focus, if possible, see @ref{Input Focus}. The return
833 value is the buffer that was switched to. 835 value is the buffer that was switched to.
834 836
835 If @var{buffer-or-name} is @code{nil}, that means to choose some other 837 If @var{buffer-or-name} is @code{nil}, that means to choose some other
836 buffer, but you don't specify which. If @var{buffer-or-name} is a 838 buffer, but you don't specify which. If @var{buffer-or-name} is a
837 string that does not name an existing buffer, a buffer by that name is 839 string that does not name an existing buffer, a buffer by that name is
849 just a minibuffer, @code{pop-to-buffer} operates within the most 851 just a minibuffer, @code{pop-to-buffer} operates within the most
850 recently selected frame that was not just a minibuffer.) 852 recently selected frame that was not just a minibuffer.)
851 853
852 If the variable @code{pop-up-windows} is non-@code{nil}, windows may be 854 If the variable @code{pop-up-windows} is non-@code{nil}, windows may be
853 split to create a new window that is different from the original window. 855 split to create a new window that is different from the original window.
854 For details, @xref{Choosing Window}. 856 For details, see @ref{Choosing Window}.
855 857
856 If @var{other-window} is non-@code{nil}, @code{pop-to-buffer} finds or 858 If @var{other-window} is non-@code{nil}, @code{pop-to-buffer} finds or
857 creates another window even if @var{buffer-or-name} is already visible 859 creates another window even if @var{buffer-or-name} is already visible
858 in the selected window. Thus @var{buffer-or-name} could end up 860 in the selected window. Thus @var{buffer-or-name} could end up
859 displayed in two windows. On the other hand, if @var{buffer-or-name} is 861 displayed in two windows. On the other hand, if @var{buffer-or-name} is
891 @node Choosing Window 893 @node Choosing Window
892 @section Choosing a Window for Display 894 @section Choosing a Window for Display
893 895
894 This section describes the basic facility that chooses a window to 896 This section describes the basic facility that chooses a window to
895 display a buffer in---@code{display-buffer}. Higher-level functions and 897 display a buffer in---@code{display-buffer}. Higher-level functions and
896 commands like @code{switch-to-buffer} and @code{pop-to-buffer} use this 898 commands, like @code{switch-to-buffer} and @code{pop-to-buffer}, use this
897 subroutine. Here we describe how to use @code{display-buffer} and how 899 subroutine. Here we describe how to use @code{display-buffer} and how
898 to customize it. 900 to customize it.
899 901
900 @deffn Command display-buffer buffer-or-name &optional not-this-window frame 902 @deffn Command display-buffer buffer-or-name &optional not-this-window frame
901 This command makes @var{buffer-or-name} appear in some window, but it 903 This command makes @var{buffer-or-name} appear in some window, but it
1210 @defun window-dedicated-p &optional window 1212 @defun window-dedicated-p &optional window
1211 This function returns non-@code{nil} if @var{window} is dedicated to its 1213 This function returns non-@code{nil} if @var{window} is dedicated to its
1212 buffer and @code{nil} otherwise. More precisely, the return value is 1214 buffer and @code{nil} otherwise. More precisely, the return value is
1213 the value assigned by the last call of @code{set-window-dedicated-p} for 1215 the value assigned by the last call of @code{set-window-dedicated-p} for
1214 @var{window} or @code{nil} if that function was never called with 1216 @var{window} or @code{nil} if that function was never called with
1215 @var{WINDOW} as its argument. @var{WINDOW} defaults to the selected 1217 @var{window} as its argument. @var{window} defaults to the selected
1216 window. 1218 window.
1217 @end defun 1219 @end defun
1218 1220
1219 @defun set-window-dedicated-p window flag 1221 @defun set-window-dedicated-p window flag
1220 This function marks @var{window} as dedicated to its buffer if 1222 This function marks @var{window} as dedicated to its buffer if
2101 frame. 2103 frame.
2102 2104
2103 If there are various other windows from which lines or columns can be 2105 If there are various other windows from which lines or columns can be
2104 stolen, and some of them specify fixed size (using 2106 stolen, and some of them specify fixed size (using
2105 @code{window-size-fixed}, see below), they are left untouched while 2107 @code{window-size-fixed}, see below), they are left untouched while
2106 other windows are ``robbed''. If it would be necessary to alter the 2108 other windows are ``robbed.'' If it would be necessary to alter the
2107 size of a fixed-size window, @code{enlarge-window} gets an error 2109 size of a fixed-size window, @code{enlarge-window} gets an error
2108 instead. 2110 instead.
2109 2111
2110 If @var{size} is negative, this function shrinks the selected window by 2112 If @var{size} is negative, this function shrinks the selected window by
2111 @minus{}@var{size} lines or columns. If that makes the window smaller 2113 @minus{}@var{size} lines or columns. If that makes the window smaller
2233 includes any fringes or the scroll bar. The default value is @code{10}. 2235 includes any fringes or the scroll bar. The default value is @code{10}.
2234 A value less than @code{2} is ignored. 2236 A value less than @code{2} is ignored.
2235 @end defopt 2237 @end defopt
2236 2238
2237 @cindex balancing window sizes 2239 @cindex balancing window sizes
2238 Emacs provides two functions to balance windows, that means, to even out 2240 Emacs provides two functions to balance windows, that is, to even out
2239 the sizes of windows on the same frame. The minibuffer window and 2241 the sizes of windows on the same frame. The minibuffer window and
2240 fixed-size windows are not resized by these functions. 2242 fixed-size windows are not resized by these functions.
2241 2243
2242 @deffn Command balance-windows &optional window-or-frame 2244 @deffn Command balance-windows &optional window-or-frame
2243 This function balances windows in a way that gives more space to 2245 This function balances windows in a way that gives more space to
2244 full-width and/or full-height windows. If @var{window-or-frame} 2246 full-width and/or full-height windows. If @var{window-or-frame}
2245 specifies a frame, it balances all windows on that frame. If 2247 specifies a frame, it balances all windows on that frame. If
2246 @var{window-or-frame} specifies a window, it balances this window and 2248 @var{window-or-frame} specifies a window, it balances this window and
2247 its ``siblings'' only. Think of a sibling as the other (original or 2249 its ``siblings'' only. Think of a sibling as the other (original or
2248 new) window with respect to the present one, involved in the process of 2250 new) window with respect to the present one, involved in the process of
2249 splitting, @xref{Splitting Windows}. Since a sibling may have been 2251 splitting, see @ref{Splitting Windows}. Since a sibling may have been
2250 split again, a window can have more than one sibling. 2252 split again, a window can have more than one sibling.
2251 @end deffn 2253 @end deffn
2252 2254
2253 @deffn Command balance-windows-area 2255 @deffn Command balance-windows-area
2254 This function attempts to give all windows on the selected frame 2256 This function attempts to give all windows on the selected frame
2255 approximately the same share of the screen area. This means, that 2257 approximately the same share of the screen area. This means that
2256 full-width or full-height windows are not given more space than other 2258 full-width or full-height windows are not given more space than other
2257 windows. 2259 windows.
2258 @end deffn 2260 @end deffn
2259 2261
2260 @node Coordinates and Windows 2262 @node Coordinates and Windows
2354 buffers are scrolled, and their values of point and the mark; also their 2356 buffers are scrolled, and their values of point and the mark; also their
2355 fringes, margins, and scroll bar settings. It also includes the value 2357 fringes, margins, and scroll bar settings. It also includes the value
2356 of @code{minibuffer-scroll-window}. As a special exception, the window 2358 of @code{minibuffer-scroll-window}. As a special exception, the window
2357 configuration does not record the value of point in the selected window 2359 configuration does not record the value of point in the selected window
2358 for the current buffer. Also, the window configuration does not record 2360 for the current buffer. Also, the window configuration does not record
2359 the values of window parameters, @xref{Window Parameters}. 2361 the values of window parameters, see @ref{Window Parameters}.
2360 2362
2361 You can bring back an entire frame layout by restoring a window 2363 You can bring back an entire frame layout by restoring a previously
2362 configuration previously saved. If you want to record the layout of all 2364 saved window configuration. If you want to record the layout of all
2363 frames instead of just one, use a frame configuration instead of a 2365 frames instead of just one, use a frame configuration instead of a
2364 window configuration, @xref{Frame Configurations}. 2366 window configuration, see @ref{Frame Configurations}.
2365 2367
2366 @defun current-window-configuration &optional frame 2368 @defun current-window-configuration &optional frame
2367 This function returns a new object representing @var{frame}'s current 2369 This function returns a new object representing @var{frame}'s current
2368 window configuration. @var{frame} defaults to the selected frame. 2370 window configuration. @var{frame} defaults to the selected frame.
2369 @end defun 2371 @end defun
2476 This function returns @var{window}'s value for @var{parameter}. 2478 This function returns @var{window}'s value for @var{parameter}.
2477 @var{window} defaults to the selected window. If @var{window} has no 2479 @var{window} defaults to the selected window. If @var{window} has no
2478 setting for @var{parameter}, this function returns @code{nil}. 2480 setting for @var{parameter}, this function returns @code{nil}.
2479 @end defun 2481 @end defun
2480 2482
2481 @defun window-parameters &optional window 2483 @defun window-parameters &optional window
2482 This function returns all parameters of @var{window} and their values. 2484 This function returns all parameters of @var{window} and their values.
2483 @var{window} defaults to the selected window. The return value is an 2485 @var{window} defaults to the selected window. The return value is an
2484 association list of elements of the form (@var{parameter} 2486 association list of elements of the form @code{(@var{parameter}
2485 . @var{value}). 2487 . @var{value})}.
2486 @end defun 2488 @end defun
2487 2489
2488 @defun set-window-parameter window parameter value 2490 @defun set-window-parameter window parameter value
2489 This function sets @var{window}'s value of @var{parameter} to 2491 This function sets @var{window}'s value of @var{parameter} to
2490 @var{value} and returns @var{value}. @var{window} defaults to the 2492 @var{value} and returns @var{value}. @var{window} defaults to the
2494 Currently, window parameters are not saved in window configurations and 2496 Currently, window parameters are not saved in window configurations and
2495 consequently not restored by @code{set-window-configuration}. Hence, 2497 consequently not restored by @code{set-window-configuration}. Hence,
2496 any change of a parameter introduced via @code{set-window-parameter} can 2498 any change of a parameter introduced via @code{set-window-parameter} can
2497 be undone only by invoking @code{set-window-parameter} for the same 2499 be undone only by invoking @code{set-window-parameter} for the same
2498 parameter again. Since @code{save-window-excursion} relies on window 2500 parameter again. Since @code{save-window-excursion} relies on window
2499 configurations, window parameters are not saved and restored by that 2501 configurations (@pxref{Window Configurations}), window parameters are
2500 special form either, @xref{Window Configurations}. 2502 not saved and restored by that special form, either.
2501 2503
2502 @node Window Hooks 2504 @node Window Hooks
2503 @section Hooks for Window Scrolling and Changes 2505 @section Hooks for Window Scrolling and Changes
2504 @cindex hooks for window operations 2506 @cindex hooks for window operations
2505 2507