aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2009-05-10 07:13:33 +0000
committerMartin Rudalics2009-05-10 07:13:33 +0000
commit714c35417e182bb52584a4a4ac723f4e3e5ab457 (patch)
tree95cd9a58f3697e5633a15de58268432ed990399f
parent0e90e7befb01afa55de1657e2ca719fac04df489 (diff)
downloademacs-714c35417e182bb52584a4a4ac723f4e3e5ab457.tar.gz
emacs-714c35417e182bb52584a4a4ac723f4e3e5ab457.zip
(Choosing Window): Fix rewrite of window splitting section.
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/windows.texi72
2 files changed, 43 insertions, 34 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index f4596416bb2..a7cab403191 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12009-05-10 Martin Rudalics <rudalics@gmx.at>
2
3 * windows.texi (Choosing Window): Fix rewrite of window
4 splitting section.
5
12009-05-09 Eli Zaretskii <eliz@gnu.org> 62009-05-09 Eli Zaretskii <eliz@gnu.org>
2 7
3 * nonascii.texi (Default Coding Systems): Document 8 * nonascii.texi (Default Coding Systems): Document
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 4d4d466f5af..f57edeea635 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -974,7 +974,7 @@ the function returns @code{nil}, this means that the argument window
974cannot (or shall not) be split. 974cannot (or shall not) be split.
975 975
976The default value of @code{split-window-preferred-function} is the 976The default value of @code{split-window-preferred-function} is the
977function @code{split-window-sensibly} described below. When you 977function @code{split-window-sensibly} described below. If you
978customize this option, bear in mind that the @code{display-buffer} 978customize this option, bear in mind that the @code{display-buffer}
979routines may call your function up to two times when trying to split a 979routines may call your function up to two times when trying to split a
980window. The argument of the first call is the largest window on the 980window. The argument of the first call is the largest window on the
@@ -983,55 +983,59 @@ fails to return a live window, your function is called a second time
983with the least recently used window on that frame (as returned by 983with the least recently used window on that frame (as returned by
984@code{get-lru-window}). 984@code{get-lru-window}).
985 985
986The function assigned to this option may also try to split any other 986The function specified by this option may try to split any other window
987window instead of the argument window. Note that the window selected at 987instead of the argument window. Note that the window selected at the
988the time @code{display-buffer} was invoked is still selected when your 988time @code{display-buffer} was invoked is still selected when your
989function is called. Hence, you can split the selected window (instead 989function is called. Hence, you can split the selected window (instead
990of the largest or least recently used one) by simply ignoring the window 990of the largest or least recently used one) by simply ignoring the window
991argument in the body of your function. You can even choose to not split 991argument in the body of your function. You can even choose to not split
992any window as long as the return value of your function specifies a live 992any window as long as the return value of your function specifies a live
993window or nil, but you are not encouraged to do so unconditionally. If 993window or @code{nil}, but you are not encouraged to do so
994you want @code{display-buffer} to never split any windows, set 994unconditionally. If you want @code{display-buffer} to never split any
995@code{pop-up-windows} to @code{nil}. 995windows, set @code{pop-up-windows} to @code{nil}.
996@end defvar 996@end defvar
997 997
998@defun split-window-sensibly 998@defun split-window-sensibly window
999This function takes a window as argument and tries to split that window 999This function takes a window as argument and tries to split that window
1000in a suitable way. The two variables described next are useful for 1000in a suitable way. The two variables described next are useful for
1001tuning the behavior of this function. 1001tuning the behavior of this function.
1002@end defun 1002@end defun
1003 1003
1004@defopt split-height-threshold 1004@defopt split-height-threshold
1005This variable specifies whether @code{split-window-sensibly} may split 1005This variable specifies whether @code{split-window-sensibly} is allowed
1006its argument window vertically. If this variable is set to an integer, 1006to vertically split the window passed to it as argument. If the value
1007@code{split-window-sensibly} splits the window only if it has at least 1007of this variable is an integer, @code{split-window-sensibly} tries to
1008this many lines. If the value of this variable is @code{nil}, 1008vertically split that window only if it has at least this many lines.
1009@code{split-window-sensibly} tries to split the window horizontally, 1009If the window has less lines, splitting fails, or the value of this
1010subject to restrictions of @code{split-width-threshold} (see below). If 1010variable is @code{nil}, @code{split-window-sensibly} will try to split
1011splitting horizontally fails too, @code{split-window-sensibly} will try 1011the window horizontally, subject to restrictions of
1012to split the window vertically disregarding the value of this variable. 1012@code{split-width-threshold} (see below). If splitting horizontally
1013 1013fails too and the window is the only window on its frame,
1014@code{split-window-sensibly} does not split a window vertically whose 1014@code{split-window-sensibly} will try to split the window vertically
1015height is fixed (@pxref{Resizing Windows}). Moreover, it splits a 1015disregarding the value of @code{split-height-threshold}. If this fails
1016window vertically only if the space taken up by that window can 1016as well, @code{split-window-sensibly} returns @code{nil}.
1017accommodate two windows one above the other that are both at least 1017
1018@code{window-min-height} lines tall. Finally, if the window that shall 1018@code{split-window-sensibly} does not split vertically a window whose
1019be split has a mode line, @code{split-window-sensibly} makes sure that 1019height is fixed (@pxref{Resizing Windows}). Also, it vertically splits
1020the new window can accomodate a mode line as well. 1020a window only if the space taken up by that window can accommodate two
1021windows one above the other that are both at least
1022@code{window-min-height} lines tall. Moreover, if the window that shall
1023be split has a mode line, @code{split-window-sensibly} does not split
1024the window unless the new window can accomodate a mode line too.
1021@end defopt 1025@end defopt
1022 1026
1023@defopt split-width-threshold 1027@defopt split-width-threshold
1024This variable specifies whether @code{split-window-sensibly} may split 1028This variable specifies whether @code{split-window-sensibly} is allowed
1025its argument window horizontally. If this variable is set to an 1029to horizontally split the window passed to it as argument. If the value
1026integer, @code{split-window-sensibly} splits the window only if it has 1030of this variable is an integer, @code{split-window-sensibly} tries to
1027at least this many columns. If the value of this variable is 1031horizontally split that window only if it has at least this many
1028@code{nil}, @code{split-window-sensibly} will not split the window 1032columns. If the value is @code{nil}, @code{split-window-sensibly} will
1029horizontally. (It still might split the window vertically, though, see 1033not split the window horizontally. (It still might split the window
1030above.) 1034vertically, though, see above.)
1031 1035
1032@code{split-window-sensibly} does not split a window horizontally if 1036@code{split-window-sensibly} does not split horizontally a window if
1033that window's width is fixed (@pxref{Resizing Windows}). Also, it 1037that window's width is fixed (@pxref{Resizing Windows}). Also, it
1034splits a window horizontally only if the space that window takes up can 1038horizontally splits a window only if the space that window takes up can
1035accommodate two windows side by side that are both at least 1039accommodate two windows side by side that are both at least
1036@code{window-min-width} columns wide. 1040@code{window-min-width} columns wide.
1037@end defopt 1041@end defopt