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