aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog37
-rw-r--r--doc/lispref/buffers.texi9
-rw-r--r--doc/lispref/files.texi2
-rw-r--r--doc/lispref/frames.texi3
-rw-r--r--doc/lispref/internals.texi2
-rw-r--r--doc/lispref/intro.texi2
-rw-r--r--doc/lispref/processes.texi2
-rw-r--r--doc/lispref/spellfile3
-rw-r--r--doc/lispref/two-volume-cross-refs.txt4
-rw-r--r--doc/lispref/windows.texi336
10 files changed, 213 insertions, 187 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index cbe016ac96d..0fa50492481 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,36 @@
12011-11-17 Martin Rudalics <rudalics@gmx.at>
2
3 * windows.texi (Resizing Windows, Splitting Windows)
4 (Deleting Windows): Use term window-combination-resize instead
5 of window-splits.
6
72011-11-16 Martin Rudalics <rudalics@gmx.at>
8
9 * windows.texi (Resizing Windows, Splitting Windows): Rename
10 occurrences of window-nest to window-combination-limit.
11
122011-11-14 Juanma Barranquero <lekktu@gmail.com>
13
14 * intro.texi (Lisp History): Fix typo.
15
162011-11-12 Martin Rudalics <rudalics@gmx.at>
17
18 * windows.texi (Splitting Windows, Deleting Windows): Remove
19 references to splits status of windows.
20
212011-11-10 Glenn Morris <rgm@gnu.org>
22
23 * buffers.texi (Read Only Buffers): Expand a bit on why
24 toggle-read-only should only be used interactively. (Bug#7292)
25
262011-11-09 Chong Yidong <cyd@gnu.org>
27
28 * windows.texi (Window Sizes): Document window-pixel-edges,
29 window-inside-pixel-edges, window-absolute-pixel-edges, and
30 window-inside-absolute-pixel-edges.
31 (Resizing Windows): shrink-window-if-larger-than-buffer works on
32 non-full-width windows.
33
12011-11-09 Martin Rudalics <rudalics@gmx.at> 342011-11-09 Martin Rudalics <rudalics@gmx.at>
2 35
3 * windows.texi (Resizing Windows): Rewrite documentation of 36 * windows.texi (Resizing Windows): Rewrite documentation of
@@ -1094,9 +1127,9 @@
1094 * commands.texi (Misc Events): Add cross-references to where 1127 * commands.texi (Misc Events): Add cross-references to where
1095 POSITION of a mouse event is described in detail. 1128 POSITION of a mouse event is described in detail.
1096 1129
10972010-08-08 Christoph <cschol2112@googlemail.com> 11302010-08-08 Christoph Scholtes <cschol2112@googlemail.com>
1098 1131
1099 * control.texi (Handling Errors) <error-message-string>: Fix arg name. 1132 * control.texi (Handling Errors) <error-message-string>: Fix arg name.
1100 1133
11012010-08-08 Juanma Barranquero <lekktu@gmail.com> 11342010-08-08 Juanma Barranquero <lekktu@gmail.com>
1102 1135
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 816d0f9faa8..ee2ce2e2001 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -748,10 +748,11 @@ of the list (comparison is done with @code{eq}).
748 748
749@deffn Command toggle-read-only &optional arg 749@deffn Command toggle-read-only &optional arg
750This command toggles whether the current buffer is read-only. It is 750This command toggles whether the current buffer is read-only. It is
751intended for interactive use; do not use it in programs. At any given 751intended for interactive use; do not use it in programs (it may have
752point in a program, you should know whether you want the read-only flag 752side-effects, such as enabling View mode, and does not affect
753on or off; so you can set @code{buffer-read-only} explicitly to the 753read-only text properties). To change the read-only state of a buffer in
754proper value, @code{t} or @code{nil}. 754a program, explicitly set @code{buffer-read-only} to the proper value.
755To temporarily ignore a read-only state, bind @code{inhibit-read-only}.
755 756
756If @var{arg} is non-@code{nil}, it should be a raw prefix argument. 757If @var{arg} is non-@code{nil}, it should be a raw prefix argument.
757@code{toggle-read-only} sets @code{buffer-read-only} to @code{t} if 758@code{toggle-read-only} sets @code{buffer-read-only} to @code{t} if
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 71b612c527d..86ecfd122ef 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -2827,7 +2827,7 @@ If @code{file-remote-p} returns the same identifier for two different
2827filenames, that means they are stored on the same file system and can 2827filenames, that means they are stored on the same file system and can
2828be accessed locally with respect to each other. This means, for 2828be accessed locally with respect to each other. This means, for
2829example, that it is possible to start a remote process accessing both 2829example, that it is possible to start a remote process accessing both
2830files at the same time. Implementors of file handlers need to ensure 2830files at the same time. Implementers of file handlers need to ensure
2831this principle is valid. 2831this principle is valid.
2832 2832
2833@var{identification} specifies which part of the identifier shall be 2833@var{identification} specifies which part of the identifier shall be
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index d9399e98a69..d2e86a77112 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -2414,7 +2414,7 @@ This function returns the ``vendor'' that provided the X server
2414software (as a string). Really this means whoever distributes the X 2414software (as a string). Really this means whoever distributes the X
2415server. 2415server.
2416 2416
2417When the developers of X labelled software distributors as 2417When the developers of X labeled software distributors as
2418``vendors,'' they showed their false assumption that no system could 2418``vendors,'' they showed their false assumption that no system could
2419ever be developed and distributed noncommercially. 2419ever be developed and distributed noncommercially.
2420@end defun 2420@end defun
@@ -2430,4 +2430,3 @@ This variable's value is @code{t} if no X window manager is in use.
2430The functions @code{x-pixel-width} and @code{x-pixel-height} return the 2430The functions @code{x-pixel-width} and @code{x-pixel-height} return the
2431width and height of an X Window frame, measured in pixels. 2431width and height of an X Window frame, measured in pixels.
2432@end ignore 2432@end ignore
2433
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index 5cdd983f40d..0168c564e34 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -887,7 +887,7 @@ known to be unchanged since the last complete redisplay.
887@item unchanged_modified 887@item unchanged_modified
888@itemx overlay_unchanged_modified 888@itemx overlay_unchanged_modified
889The values of @code{modiff} and @code{overlay_modiff}, respectively, 889The values of @code{modiff} and @code{overlay_modiff}, respectively,
890after the last compelete redisplay. If their current values match 890after the last complete redisplay. If their current values match
891@code{modiff} or @code{overlay_modiff}, that means 891@code{modiff} or @code{overlay_modiff}, that means
892@code{beg_unchanged} and @code{end_unchanged} contain no useful 892@code{beg_unchanged} and @code{end_unchanged} contain no useful
893information. 893information.
diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi
index 7c070726023..44ac947fa99 100644
--- a/doc/lispref/intro.texi
+++ b/doc/lispref/intro.texi
@@ -101,7 +101,7 @@ for other purposes as well, such as writing editing commands.
101 Dozens of Lisp implementations have been built over the years, each 101 Dozens of Lisp implementations have been built over the years, each
102with its own idiosyncrasies. Many of them were inspired by Maclisp, 102with its own idiosyncrasies. Many of them were inspired by Maclisp,
103which was written in the 1960s at MIT's Project MAC. Eventually the 103which was written in the 1960s at MIT's Project MAC. Eventually the
104implementors of the descendants of Maclisp came together and developed a 104implementers of the descendants of Maclisp came together and developed a
105standard for Lisp systems, called Common Lisp. In the meantime, Gerry 105standard for Lisp systems, called Common Lisp. In the meantime, Gerry
106Sussman and Guy Steele at MIT developed a simplified but very powerful 106Sussman and Guy Steele at MIT developed a simplified but very powerful
107dialect of Lisp, called Scheme. 107dialect of Lisp, called Scheme.
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index d4f8ee9708b..51d91572d0e 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -420,7 +420,7 @@ remote files.
420Per default, this variable is always set to @code{t}, meaning that a 420Per default, this variable is always set to @code{t}, meaning that a
421call of @code{process-file} could potentially change any file on a 421call of @code{process-file} could potentially change any file on a
422remote host. When set to @code{nil}, a file handler could optimize 422remote host. When set to @code{nil}, a file handler could optimize
423its behaviour with respect to remote file attributes caching. 423its behavior with respect to remote file attributes caching.
424 424
425This variable should never be changed by @code{setq}. Instead of, it 425This variable should never be changed by @code{setq}. Instead of, it
426shall be set only by let-binding. 426shall be set only by let-binding.
diff --git a/doc/lispref/spellfile b/doc/lispref/spellfile
index b373d00bebf..e66dcc88f71 100644
--- a/doc/lispref/spellfile
+++ b/doc/lispref/spellfile
@@ -240,7 +240,7 @@ correct'
240counterintuitive 240counterintuitive
241cr 241cr
242creatable 242creatable
243customie 243customize
244deactivate 244deactivate
245deactivated 245deactivated
246deassigns 246deassigns
@@ -331,7 +331,6 @@ for'
331formfeed 331formfeed
332forms' 332forms'
333forw 333forw
334forwa
335found' 334found'
336frob 335frob
337from' 336from'
diff --git a/doc/lispref/two-volume-cross-refs.txt b/doc/lispref/two-volume-cross-refs.txt
index 99b48d342ab..53a9f58cd01 100644
--- a/doc/lispref/two-volume-cross-refs.txt
+++ b/doc/lispref/two-volume-cross-refs.txt
@@ -87,7 +87,7 @@ to create elisp2-aux-vol-added
87insert elisp2-aux-vol-added into vol1.aux (append) 87insert elisp2-aux-vol-added into vol1.aux (append)
88insert elisp1-aux-vol-added into vol2.aux (prepend) 88insert elisp1-aux-vol-added into vol2.aux (prepend)
89 89
90(so you dont have to do it again) 90(so you don't have to do it again)
91% cp vol1.aux elisp1-aux-ready 91% cp vol1.aux elisp1-aux-ready
92% cp vol2.aux elisp2-aux-ready 92% cp vol2.aux elisp2-aux-ready
93 93
@@ -120,7 +120,7 @@ Be sure that .fn file has no blank lines.
120% texindex vol1.fn 120% texindex vol1.fn
121% texindex vol2.fn 121% texindex vol2.fn
122 122
123(so you dont have to do it again) 123(so you don't have to do it again)
124% cp vol1.fns elisp1-fns-2vol-ready 124% cp vol1.fns elisp1-fns-2vol-ready
125% cp vol2.fns elisp2-fns-2vol-ready 125% cp vol2.fns elisp2-fns-2vol-ready
126 126
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 52ac5a53900..8c99a06909b 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -375,13 +375,13 @@ Bars}). At the top of the window is an optional header line
375line (@pxref{Mode Line Format}). 375line (@pxref{Mode Line Format}).
376 376
377 Emacs provides several functions for finding the height and width of 377 Emacs provides several functions for finding the height and width of
378a window. Most of these functions report the values as integer 378a window. Except where noted, these heights and widths are reported
379multiples of the default character height and width. On a graphical 379as integer numbers of lines and columns respectively. On a graphical
380display, the actual screen size of this default height and width are 380display, each ``line'' and ``column'' actually corresponds to the
381those specified by the frame's default font. Hence, if the buffer 381height and width of a ``default'' character specified by the frame's
382contains text that is displayed in a different size, the reported 382default font. Thus, if a window is displaying text with a different
383height and width of the window may differ from the actual number of 383font or size, the reported height and width for that window may differ
384text lines or columns displayed in it. 384from the actual number of text lines or columns displayed within it.
385 385
386@cindex window height 386@cindex window height
387@cindex height of a window 387@cindex height of a window
@@ -534,6 +534,45 @@ can be resized in the desired direction. To determine that, use the
534function @code{window-resizable}. @xref{Resizing Windows}. 534function @code{window-resizable}. @xref{Resizing Windows}.
535@end defun 535@end defun
536 536
537 The following functions can be used to find a window's size and
538position in pixels. Though mostly useful on graphical displays, they
539can also be called on text-only terminals, where the screen area of
540each text character is taken to be ``one pixel''.
541
542@defun window-pixel-edges &optional window
543This function return a list of pixel coordinates for the edges of
544@var{window}. If @var{window} is omitted or @code{nil}, it defaults
545to the selected window.
546
547The return value has the form @code{(@var{left} @var{top} @var{right}
548@var{bottom})}. The list elements are, respectively, the X coordinate
549of the left window edge, the Y coordinate of the top edge, one more
550than the X coordinate of the right edge, and one more than the Y
551coordinate of the bottom edge. The origin coordinate @samp{(0,0)} is
552taken to be the top left corner of the frame's window area.
553
554These edge values include the space used by the window's scroll bar,
555margins, fringes, header line, and mode line, if any.
556@end defun
557
558@defun window-inside-pixel-edges &optional window
559This function is like @code{window-pixel-edges}, except that it
560returns the edge coordinates for the window's text area, rather than
561the edge coordinates for the window itself. @var{window} must specify
562a live window.
563@end defun
564
565@defun window-absolute-pixel-edges &optional window
566This function is like @code{window-pixel-edges}, except that it
567returns the edge coordinates relative to the top left corner of the
568display screen.
569@end defun
570
571@defun window-inside-absolute-pixel-edges &optional window
572This function is like @code{window-inside-pixel-edges}, except that it
573returns the edge coordinates relative to the top left corner of the
574display screen. @var{window} must specify a live window.
575@end defun
537 576
538@node Resizing Windows 577@node Resizing Windows
539@section Resizing Windows 578@section Resizing Windows
@@ -593,10 +632,11 @@ the window cannot be resized as demanded, an error is signaled.
593The optional argument @var{ignore} has the same meaning as for the 632The optional argument @var{ignore} has the same meaning as for the
594function @code{window-resizable} above. 633function @code{window-resizable} above.
595 634
596The choice of which window edge this function alters depends on the 635The choice of which window edges this function alters depends on the
597splitting and nesting status of the involved windows; in some cases, 636values of the option @code{window-combination-resize} and the
598it may alter both edges. @xref{Splitting Windows}. To resize by 637combination-limit status of the involved windows; in some cases, it may
599moving only the bottom or right edge of a window, use the function 638alter both edges. @xref{Splitting Windows}. To resize by moving only
639the bottom or right edge of a window, use the function
600@code{adjust-window-trailing-edge}, below. 640@code{adjust-window-trailing-edge}, below.
601@end defun 641@end defun
602 642
@@ -604,104 +644,85 @@ moving only the bottom or right edge of a window, use the function
604@c shrink-window, and shrink-window-horizontally are documented in the 644@c shrink-window, and shrink-window-horizontally are documented in the
605@c Emacs manual. They are not preferred for calling from Lisp. 645@c Emacs manual. They are not preferred for calling from Lisp.
606 646
607 The following function is useful for moving the line dividing two
608windows.
609
610@defun adjust-window-trailing-edge window delta &optional horizontal 647@defun adjust-window-trailing-edge window delta &optional horizontal
611This function moves @var{window}'s bottom edge by @var{delta} lines. 648This function moves @var{window}'s bottom edge by @var{delta} lines.
612Optional argument @var{horizontal} non-@code{nil} means to move 649If optional argument @var{horizontal} is non-@code{nil}, it instead
613@var{window}'s right edge by @var{delta} columns. The argument 650moves the right edge by @var{delta} columns. If @var{window} is
614@var{window} defaults to the selected window. 651@code{nil}, it defaults to the selected window.
615 652
616If @var{delta} is greater zero, this moves the edge downwards or to the 653A positive @var{delta} moves the edge downwards or to the right; a
617right. If @var{delta} is less than zero, this moves the edge upwards or 654negative @var{delta} moves it upwards or to the left. If the edge
618to the left. If the edge can't be moved by @var{delta} lines or columns, 655cannot be moved as far as specified by @var{delta}, this function
619it is moved as far as possible in the desired direction but no error is 656moves it as far as possible but does not signal a error.
620signaled.
621 657
622This function tries to resize windows adjacent to the edge that is 658This function tries to resize windows adjacent to the edge that is
623moved. Only if this is insufficient, it will also resize windows not 659moved. If this is not possible for some reason (e.g. if that adjacent
624adjacent to that edge. As a consequence, if you move an edge in one 660window is fixed-size), it may resize other windows.
625direction and back in the other direction by the same amount, the
626resulting window configuration will not be necessarily identical to the
627one before the first move. So if your intend to just resize
628@var{window}, you should not use this function but call
629@code{window-resize} (see above) instead.
630@end defun 661@end defun
631 662
663 The following commands resize windows in more specific ways. When
664called interactively, they act on the selected window.
665
632@deffn Command fit-window-to-buffer &optional window max-height min-height override 666@deffn Command fit-window-to-buffer &optional window max-height min-height override
633This command makes @var{window} the right height to display its 667This command adjusts the height of @var{window} to fit the text in it.
634contents exactly. The default for @var{window} is the selected window. 668It returns non-@code{nil} if it was able to resize @var{window}, and
635 669@code{nil} otherwise. If @var{window} is omitted or @code{nil}, it
636The optional argument @var{max-height} specifies the maximum total 670defaults to the selected window. Otherwise, it should be a live
637height the window is allowed to be; @code{nil} means use the maximum 671window.
638permissible height of a window on @var{window}'s frame. The optional 672
639argument @var{min-height} specifies the minimum total height for the 673The optional argument @var{max-height}, if non-@code{nil}, specifies
640window; @code{nil} means use @code{window-min-height}. All these height 674the maximum total height that this function can give @var{window}.
641values include the mode line and/or header line. 675The optional argument @var{min-height}, if no-@code{nil}, specifies
642 676the minimum total height that it can give, which overrides the
643If the optional argument @var{override} is non-@code{nil}, this means to 677variable @code{window-min-height}.
644ignore any restrictions imposed by @code{window-min-height} and 678
645@code{window-min-width} on the size of @var{window}. 679If the optional argument @var{override} is non-@code{nil}, this
646 680function ignores any size restrictions imposed by
647This function returns non-@code{nil} if it orderly resized @var{window}, 681@code{window-min-height} and @code{window-min-width}.
648and @code{nil} otherwise.
649@end deffn 682@end deffn
650 683
651@deffn Command shrink-window-if-larger-than-buffer &optional window 684@deffn Command shrink-window-if-larger-than-buffer &optional window
652This command shrinks @var{window} vertically to be as small as possible 685This command attempts to reduce @var{window}'s height as much as
653while still showing the full contents of its buffer---but not less than 686possible while still showing its full buffer, but no less than
654@code{window-min-height} lines. The argument @var{window} must denote 687@code{window-min-height} lines. The return value is non-@code{nil} if
655a live window and defaults to the selected one. 688the window was resized, and @code{nil} otherwise. If @var{window} is
656 689omitted or @code{nil}, it defaults to the selected window. Otherwise,
657However, this command does nothing if the window is already too small to 690it should be a live window.
658display the whole text of the buffer, or if part of the contents are 691
659currently scrolled off screen, or if the window is not the full width of 692This command does nothing if the window is already too short to
660its frame, or if the window is the only window in its frame. 693display all of its buffer, or if any of the buffer is scrolled
661 694off-screen, or if the window is the only live window in its frame.
662This command returns non-@code{nil} if it actually shrank the window
663and @code{nil} otherwise.
664@end deffn 695@end deffn
665 696
666@cindex balancing window sizes 697@cindex balancing window sizes
667Emacs provides two functions to balance windows, that is, to even out
668the sizes of all windows on the same frame. The minibuffer window and
669fixed-size windows are not resized by these functions.
670
671@deffn Command balance-windows &optional window-or-frame 698@deffn Command balance-windows &optional window-or-frame
672This function balances windows in a way that gives more space to 699This function balances windows in a way that gives more space to
673full-width and/or full-height windows. If @var{window-or-frame} 700full-width and/or full-height windows. If @var{window-or-frame}
674specifies a frame, it balances all windows on that frame. If 701specifies a frame, it balances all windows on that frame. If
675@var{window-or-frame} specifies a window, it balances that window and 702@var{window-or-frame} specifies a window, it balances only that window
676its siblings (@pxref{Windows and Frames}) only. 703and its siblings (@pxref{Windows and Frames}).
677@end deffn 704@end deffn
678 705
679@deffn Command balance-windows-area 706@deffn Command balance-windows-area
680This function attempts to give all windows on the selected frame 707This function attempts to give all windows on the selected frame
681approximately the same share of the screen area. This means that 708approximately the same share of the screen area. Full-width or
682full-width or full-height windows are not given more space than other 709full-height windows are not given more space than other windows.
683windows.
684@end deffn 710@end deffn
685 711
686@cindex maximizing windows 712@cindex maximizing windows
687The following function can be used to give a window the maximum possible
688size without deleting other ones.
689
690@deffn Command maximize-window &optional window 713@deffn Command maximize-window &optional window
691This function maximizes @var{window}. More precisely, this makes 714This function attempts to make @var{window} as large as possible, in
692@var{window} as large as possible without resizing its frame or deleting 715both dimensions, without resizing its frame or deleting other windows.
693other windows. @var{window} can be any window and defaults to the 716If @var{window} is omitted or @code{nil}, it defaults to the selected
694selected one. 717window.
695@end deffn 718@end deffn
696 719
697@cindex minimizing windows 720@cindex minimizing windows
698To make a window as small as possible without deleting it the
699following function can be used.
700
701@deffn Command minimize-window &optional window 721@deffn Command minimize-window &optional window
702This function minimizes @var{window}. More precisely, this makes 722This function attempts to make @var{window} as small as possible, in
703@var{window} as small as possible without deleting it or resizing its 723both dimensions, without deleting it or resizing its frame. If
704frame. @var{window} can be any window and defaults to the selected one. 724@var{window} is omitted or @code{nil}, it defaults to the selected
725window.
705@end deffn 726@end deffn
706 727
707 728
@@ -719,7 +740,7 @@ This function creates a new live window next to the window
719to the selected window. That window is ``split'', and reduced in 740to the selected window. That window is ``split'', and reduced in
720size. The space is taken up by the new window, which is returned. 741size. The space is taken up by the new window, which is returned.
721 742
722The optional second argument @var{size} determines the sizes of the 743The optional second argument @var{size} determines the sizes of
723@var{window} and/or the new window. If it is omitted or @code{nil}, 744@var{window} and/or the new window. If it is omitted or @code{nil},
724both windows are given equal sizes; if there is an odd line, it is 745both windows are given equal sizes; if there is an odd line, it is
725allocated to the new window. If @var{size} is a positive number, 746allocated to the new window. If @var{size} is a positive number,
@@ -765,10 +786,10 @@ lieu of the usual action of @code{split-window}.
765 786
766 As an example, we show a combination of @code{split-window} calls 787 As an example, we show a combination of @code{split-window} calls
767that yields the window configuration discussed in @ref{Windows and 788that yields the window configuration discussed in @ref{Windows and
768Frames}. This example demonstrates splitting live windows as well as 789Frames}. This example demonstrates splitting a live window as well as
769splitting internal windows. We begin with a frame containing a single 790splitting an internal window. We begin with a frame containing a
770window (a live root window), which we denote by @var{W4}. Calling 791single window (a live root window), which we denote by @var{W4}.
771@code{(split-window W3)} yields this window configuration: 792Calling @code{(split-window W3)} yields this window configuration:
772 793
773@smallexample 794@smallexample
774@group 795@group
@@ -816,15 +837,14 @@ internal window @var{W3} as the argument. The result:
816@end smallexample 837@end smallexample
817 838
818@noindent 839@noindent
819A new live window, @var{W2}, is created to the left of @var{W3} (which 840A new live window @var{W2} is created, to the left of the internal
820encompasses the vertical window combination of @var{W4} and @var{W5}). 841window @var{W3}. A new internal window @var{W1} is created, becoming
821A new internal window @var{W1} is also created, and becomes the new 842the new root window.
822root window.
823 843
824 The following two options can be used to modify the operation of 844 The following two options can be used to modify the operation of
825@code{split-window}. 845@code{split-window}.
826 846
827@defopt window-splits 847@defopt window-combination-resize
828If this variable is @code{nil}, @code{split-window} can only split a 848If this variable is @code{nil}, @code{split-window} can only split a
829window (denoted by @var{window}) if @var{window}'s screen area is 849window (denoted by @var{window}) if @var{window}'s screen area is
830large enough to accommodate both itself and the new window. This is 850large enough to accommodate both itself and the new window. This is
@@ -836,45 +856,16 @@ resize all windows that are part of the same combination as
836this may allow @code{split-window} to succeed even if @var{window} is 856this may allow @code{split-window} to succeed even if @var{window} is
837a fixed-size window or too small to ordinarily split. 857a fixed-size window or too small to ordinarily split.
838 858
839In any case, the value of this variable is assigned to the splits status 859Also if this variable is non-@code{nil}, subsequent resizing and
840of the new window and, provided old and new window form a new 860deleting @var{window} will usually affect @emph{all} windows in
841combination, of the old window as well. The splits status of a window 861@var{window}'s combination.
842can be retrieved by invoking the function @code{window-splits} and
843altered by the function @code{set-window-splits} described next.
844 862
845If @code{window-nest} (see below) is non-@code{nil}, the space for the 863The setting of this variable has no effect if
846new window is exclusively taken from the old window, but the splits 864@code{window-combination-limit} (see below) is non-@code{nil}.
847status of the involved windows is nevertheless set as described here.
848@end defopt 865@end defopt
849 866
850@defun window-splits &optional window 867To illustrate the use of @code{window-combination-resize} consider the
851This function returns the splits status of @var{window}. The argument 868following window configuration:
852@var{window} can be any window and defaults to the selected one.
853
854@cindex splits status
855The @dfn{splits status} of a window specifies how resizing and deleting
856that window may affect the size of other windows in the same window
857combination. More precisely, if @var{window}'s splits status is
858@code{nil} and @var{window} is resized, the corresponding space is
859preferably taken from (or given to) @var{window}'s right sibling. When
860@var{window} is deleted, its space is given to its left sibling. If
861@var{window}'s splits status is non-@code{nil}, resizing and deleting
862@var{window} may resize @emph{all} windows in @var{window}'s
863combination.
864
865The splits status is initially set by @code{split-window}
866from the current value of the variable @code{window-splits} (see above)
867and can be reset by the function @code{set-window-splits} (see below).
868@end defun
869
870@defun set-window-splits window &optional status
871This function sets the splits status (see above) of @var{window} to
872@var{status}. The argument @var{window} can be any window and defaults
873to the selected one. The return value is @var{status}.
874@end defun
875
876To illustrate the use of @code{window-splits} consider the following
877window configuration:
878@smallexample 869@smallexample
879@group 870@group
880 ______________________________________ 871 ______________________________________
@@ -895,8 +886,9 @@ window configuration:
895@end group 886@end group
896@end smallexample 887@end smallexample
897 888
898Splitting window @code{W3} with @code{window-splits} @code{nil} 889Splitting window @code{W3} with @code{window-combination-resize}
899produces a configuration where the size of @code{W2} remains unchanged: 890@code{nil} produces a configuration where the size of @code{W2} remains
891unchanged:
900@smallexample 892@smallexample
901@group 893@group
902 ______________________________________ 894 ______________________________________
@@ -917,10 +909,8 @@ produces a configuration where the size of @code{W2} remains unchanged:
917@end group 909@end group
918@end smallexample 910@end smallexample
919 911
920Splitting @code{W3} with @code{window-splits} non-@code{nil} instead 912Splitting @code{W3} with @code{window-combination-resize} non-@code{nil}
921produces a configuration where all windows have approximately the same 913instead steals the space for @code{W4} from both @code{W2} and @code{W3}:
922height:
923
924@smallexample 914@smallexample
925@group 915@group
926 ______________________________________ 916 ______________________________________
@@ -941,34 +931,36 @@ height:
941@end group 931@end group
942@end smallexample 932@end smallexample
943 933
944@defopt window-nest 934@defopt window-combination-limit
945If this variable is @code{nil}, @code{split-window} creates a new parent 935If this variable is @code{nil}, @code{split-window} creates a new parent
946window if and only if the old window has no parent window or shall be 936window if and only if the old window has no parent window or shall be
947split orthogonally to the combination it is part of. If this variable 937split orthogonally to the combination it is part of. If this variable
948is non-@code{nil}, @code{split-window} always creates a new parent 938is @code{t}, @code{split-window} always creates a new parent window. If
949window. If this variable is always non-@code{nil}, a frame's window 939this variable is always @code{t}, a frame's window tree is a binary tree
950tree is a binary tree so every window but the frame's root window has 940so every window but the frame's root window has exactly one sibling.
951exactly one sibling. 941Other values are reserved for future use.
952 942
953The value of this variable is also assigned to the nest status of the 943The value of this variable is also assigned to the combination-limit
954new parent window. The nest status of any window can be retrieved via 944status of the new parent window. The combination-limit status of any
955the function @code{window-nest} and altered by the function 945window can be retrieved via the function @code{window-combination-limit}
956@code{set-window-nest}, see below. 946and altered by the function @code{set-window-combination-limit}, see
947below.
957@end defopt 948@end defopt
958 949
959@defun window-nest &optional window 950@defun window-combination-limit &optional window
960This function returns the nest status of @var{window}. The argument 951This function returns the combination-limit status of @var{window}. The
961@var{window} can be any window and defaults to the selected one. Note, 952argument @var{window} can be any window and defaults to the selected
962however, that the nest status is currently meaningful for internal 953one. Note, however, that the combination-limit status is currently
963windows only. 954meaningful for internal windows only.
964 955
965@cindex nest status 956@cindex combination-limit status
966The @dfn{nest status} of a window specifies whether that window may be 957The @dfn{combination-limit status} of a window specifies whether that
967removed and its child windows recombined with that window's siblings 958window may be removed and its child windows recombined with that
968when such a sibling's child window is deleted. The nest status is 959window's siblings when such a sibling's child window is deleted. The
969initially assigned by @code{split-window} from the current value of the 960combination-limit status is initially assigned by @code{split-window}
970variable @code{window-nest} (see above) and can be reset by the function 961from the current value of the variable @code{window-combination-limit}
971@code{set-window-nest} (see below). 962(see above) and can be reset by the function
963@code{set-window-combination-limit} (see below).
972 964
973If the return value is @code{nil}, child windows of @var{window} may be 965If the return value is @code{nil}, child windows of @var{window} may be
974recombined with @var{window}'s siblings when a window gets deleted. A 966recombined with @var{window}'s siblings when a window gets deleted. A
@@ -976,16 +968,17 @@ return value of @code{nil} means that child windows of @var{window} are
976never (re-)combined with @var{window}'s siblings in such a case. 968never (re-)combined with @var{window}'s siblings in such a case.
977@end defun 969@end defun
978 970
979@defun set-window-nest window &optional status 971@defun set-window-combination-limit window &optional status
980This functions sets the nest status (see above) of @var{window} to 972This functions sets the combination-limit status (see above) of
981@var{status}. The argument @var{window} can be any window and defaults 973@var{window} to @var{status}. The argument @var{window} can be any
982to the selected one. Note that setting the nest status is meaningful 974window and defaults to the selected one. Note that setting the
983for internal windows only. The return value is @var{status}. 975combination-limit status is meaningful for internal windows only. The
976return value is @var{status}.
984@end defun 977@end defun
985 978
986To illustrate the use of @code{window-nest} consider the following 979To illustrate the use of @code{window-combination-limit} consider the
987configuration (throughout the following examples we shall assume that 980following configuration (throughout the following examples we shall
988@code{window-splits} invariantly is @code{nil}). 981assume that @code{window-combination-resize} invariantly is @code{nil}).
989@smallexample 982@smallexample
990@group 983@group
991 ______________________________________ 984 ______________________________________
@@ -1007,7 +1000,8 @@ configuration (throughout the following examples we shall assume that
1007@end smallexample 1000@end smallexample
1008 1001
1009Splitting @code{W2} into two windows above each other with 1002Splitting @code{W2} into two windows above each other with
1010@code{window-nest} equal @code{nil} will get you a configuration like: 1003@code{window-combination-limit} equal @code{nil} will get you a
1004configuration like:
1011@smallexample 1005@smallexample
1012@group 1006@group
1013 ______________________________________ 1007 ______________________________________
@@ -1074,9 +1068,9 @@ follows:
1074 1068
1075Hence, with respect to the initial configuration, window @code{W2} has 1069Hence, with respect to the initial configuration, window @code{W2} has
1076grown at the expense of window @code{W3}. If, however, in the initial 1070grown at the expense of window @code{W3}. If, however, in the initial
1077configuration you had split @code{W2} with @code{window-nest} bound to 1071configuration you had split @code{W2} with
1078@code{t}, a new internal window @code{W5} would have been created as 1072@code{window-combination-limit} bound to @code{t}, a new internal window
1079depicted below. 1073@code{W5} would have been created as depicted below.
1080@smallexample 1074@smallexample
1081@group 1075@group
1082 ______________________________________ 1076 ______________________________________
@@ -1189,12 +1183,12 @@ window parameters. If the @code{delete-window} parameter specifies a
1189function, that function is called with @var{window} as its sole 1183function, that function is called with @var{window} as its sole
1190argument. 1184argument.
1191 1185
1192If the splits status of @var{window} (@pxref{Splitting Windows}) is 1186If @code{window-combination-resize} (@pxref{Splitting Windows}) is
1193@code{nil}, the space @var{window} took up is given to its left sibling 1187@code{nil}, the space @var{window} took up is given to its left sibling
1194if such a window exists and to its right sibling otherwise. If the 1188if such a window exists and to its right sibling otherwise. If
1195splits status of @var{window} is non-@code{nil}, its space is 1189@code{window-combination-resize} is non-@code{nil}, the space of
1196proportionally distributed among the remaining windows in the same 1190@var{window} is proportionally distributed among the remaining windows
1197combination. 1191in the same combination.
1198@end deffn 1192@end deffn
1199 1193
1200@deffn Command delete-other-windows &optional window 1194@deffn Command delete-other-windows &optional window