Commit 43c59a3d authored by Eli Zaretskii's avatar Eli Zaretskii

(Displaying Buffers): Minor wording fix.

(Choosing Window): `split-height-threshold' can now be nil.
Document `split-width-threshold'.  `pop-up-frames' can have the value
`graphic-only'.
parent 3051e4bf
2008-10-18 Eli Zaretskii <eliz@gnu.org>
* windows.texi (Displaying Buffers): Minor wording fix.
(Choosing Window): `split-height-threshold' can now be nil.
Document `split-width-threshold'. `pop-up-frames' can have the
value `graphic-only'.
2008-10-17 Eli Zaretskii <eliz@gnu.org> 2008-10-17 Eli Zaretskii <eliz@gnu.org>
* os.texi (Startup Summary): Document `before-init-time' and * os.texi (Startup Summary): Document `before-init-time' and
......
...@@ -794,7 +794,7 @@ See the preceding section for ...@@ -794,7 +794,7 @@ See the preceding section for
@ifnottex @ifnottex
@xref{Buffers and Windows}, for @xref{Buffers and Windows}, for
@end ifnottex @end ifnottex
low-level functions that give you more precise control. All of these low-level primitives that give you more precise control. All of these
functions work by calling @code{set-window-buffer}. functions work by calling @code{set-window-buffer}.
Do not use the functions in this section in order to make a buffer Do not use the functions in this section in order to make a buffer
...@@ -951,6 +951,16 @@ Precisely how @code{display-buffer} finds or creates a window depends on ...@@ -951,6 +951,16 @@ Precisely how @code{display-buffer} finds or creates a window depends on
the variables described below. the variables described below.
@end deffn @end deffn
@defun split-window-preferred-function window
This variable specifies how to split a window. Its value, if
non-@code{nil}, should be a function of one argument, which is a
window. If this variable specifies a function, @code{display-buffer}
will call it with one or more candidate windows when it looks for a
window to split. If the argument @var{window} fits, the function is
expected to split it and return a new window. If the function returns
@code{nil}, then @var{window} will not be split.
@end defun
@defopt display-buffer-reuse-frames @defopt display-buffer-reuse-frames
If this variable is non-@code{nil}, @code{display-buffer} searches If this variable is non-@code{nil}, @code{display-buffer} searches
existing frames for a window displaying the buffer. If the buffer is existing frames for a window displaying the buffer. If the buffer is
...@@ -964,16 +974,31 @@ variables, described below. ...@@ -964,16 +974,31 @@ variables, described below.
@defopt pop-up-windows @defopt pop-up-windows
This variable controls whether @code{display-buffer} makes new windows. This variable controls whether @code{display-buffer} makes new windows.
If it is non-@code{nil} and there is only one window, then that window If it is non-@code{nil} and there is only one window, then that window
is split. If it is @code{nil}, then @code{display-buffer} does not is split vertically. If it is @code{nil}, then @code{display-buffer}
split the single window, but uses it whole. does not split the single window, but uses it whole.
@end defopt @end defopt
@defopt split-height-threshold @defopt split-height-threshold
This variable determines when @code{display-buffer} may split a window, This variable determines when @code{display-buffer} may split a window
if there are multiple windows. @code{display-buffer} always splits the vertically, if there are multiple windows. If the value is a number,
largest window if it has at least this many lines. If the largest @code{display-buffer} splits the largest window if it has at least
window is not this tall, it is split only if it is the sole window and this many lines. If the largest window is not this tall, or if the
@code{pop-up-windows} is non-@code{nil}. value of this variable is @code{nil}, @code{display-buffer} tries to
split some window horizontally, subject to restrictions of
@code{split-width-threshold} (see below). If splitting horizontally
is impossible, @code{display-buffer} will split a window vertically
only if it's the only window on its frame and not the minibuffer
window, and only if @code{pop-up-windows} is non-@code{nil}.
Otherwise, @code{display-buffer} uses one of the existing windows.
@end defopt
@defopt split-width-threshold
This variable determines when @code{display-buffer} may split a window
horizontally. If the value is a number, @code{display-buffer} may
split a window if it has at least this many columns. If the value of
this variable is @code{nil}, @code{display-buffer} will not split any
windows horizontally. (It still might split some window vertically,
though, see above.)
@end defopt @end defopt
@defopt even-window-heights @defopt even-window-heights
...@@ -989,10 +1014,13 @@ will be left alone. ...@@ -989,10 +1014,13 @@ will be left alone.
@defopt pop-up-frames @defopt pop-up-frames
This variable controls whether @code{display-buffer} makes new frames. This variable controls whether @code{display-buffer} makes new frames.
If it is non-@code{nil}, @code{display-buffer} looks for an existing If it is non-@code{nil}, @code{display-buffer} looks for an existing
window already displaying the desired buffer, on any visible frame. If window already displaying the desired buffer, on any visible frame.
it finds one, it returns that window. Otherwise it makes a new frame. If it finds one, it returns that window. Otherwise it makes a new
The variables @code{pop-up-windows} and @code{split-height-threshold} do frame, unless the variable's value is @code{graphic-only} and the
not matter if @code{pop-up-frames} is non-@code{nil}. selected frame is not on a graphic display. The variables
@code{pop-up-windows}, @code{split-height-threshold}, and
@code{split-width-threshold} do not matter if @code{pop-up-frames} is
non-@code{nil}.
If @code{pop-up-frames} is @code{nil}, then @code{display-buffer} either If @code{pop-up-frames} is @code{nil}, then @code{display-buffer} either
splits a window or reuses one. splits a window or reuses one.
......
...@@ -1221,16 +1221,21 @@ Emacs initialization. ...@@ -1221,16 +1221,21 @@ Emacs initialization.
** Changes affecting display-buffer ** Changes affecting display-buffer
+++
*** New value nil for split-height-threshold inhibits vertical splitting *** New value nil for split-height-threshold inhibits vertical splitting
unless there's no other window. unless there's no other window.
+++
*** New option split-width-threshold controls horizontal splitting. *** New option split-width-threshold controls horizontal splitting.
+++
*** A window can be split horizontally even when it's not full-width. *** A window can be split horizontally even when it's not full-width.
+++
*** New option split-window-preferred-function can be set to a function *** New option split-window-preferred-function can be set to a function
to override the default splitting mechanism of display-buffer. to override the default splitting mechanism of display-buffer.
+++
*** If pop-up-frames has the value `graphic-only', display-buffer only *** If pop-up-frames has the value `graphic-only', display-buffer only
makes a separate frame on graphic displays. makes a separate frame on graphic displays.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment