Commit b6f67890 authored by Martin Rudalics's avatar Martin Rudalics

Rename window-nest to window-combination-limit.

* window.h (window): Rename slot "nest" to "combination_limit".
* window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
(Fset_window_nest): Rename to Fset_window_combination_limit.
(Vwindow_nest): Rename to Vwindow_combination_limit.
(recombine_windows, make_parent_window, make_window)
(Fsplit_window_internal, saved_window)
(Fset_window_configuration, save_window_save): Rename all
occurrences of window_nest to window_combination_limit.
* window.el (split-window, window-state-get-1)
(window-state-put-1, window-state-put-2): Rename occurrences of
window-nest to window-combination-limit.
* cus-start.el (window-nest): Rename to
window-combination-limit.
* windows.texi (Resizing Windows, Splitting Windows): Rename
occurrences of window-nest to window-combination-limit.
parent ce7ddba0
2011-11-16 Martin Rudalics <rudalics@gmx.at>
* windows.texi (Resizing Windows, Splitting Windows): Rename
occurrences of window-nest to window-combination-limit.
2011-11-14 Juanma Barranquero <lekktu@gmail.com> 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
* intro.texi (Lisp History): Fix typo. * intro.texi (Lisp History): Fix typo.
......
...@@ -632,11 +632,12 @@ the window cannot be resized as demanded, an error is signaled. ...@@ -632,11 +632,12 @@ the window cannot be resized as demanded, an error is signaled.
The optional argument @var{ignore} has the same meaning as for the The optional argument @var{ignore} has the same meaning as for the
function @code{window-resizable} above. function @code{window-resizable} above.
The choice of which window edge this function alters depends on the The choice of which window edges this function alters depends on the
splitting and nesting status of the involved windows; in some cases, values of the option @code{window-splits} and the combination-limit
it may alter both edges. @xref{Splitting Windows}. To resize by status of the involved windows; in some cases, it may alter both edges.
moving only the bottom or right edge of a window, use the function @xref{Splitting Windows}. To resize by moving only the bottom or right
@code{adjust-window-trailing-edge}, below. edge of a window, use the function @code{adjust-window-trailing-edge},
below.
@end defun @end defun
@c The commands enlarge-window, enlarge-window-horizontally, @c The commands enlarge-window, enlarge-window-horizontally,
...@@ -859,8 +860,8 @@ Also if this variable is non-@code{nil}, subsequent resizing and ...@@ -859,8 +860,8 @@ Also if this variable is non-@code{nil}, subsequent resizing and
deleting @var{window} will usually affect @emph{all} windows in deleting @var{window} will usually affect @emph{all} windows in
@var{window}'s combination. @var{window}'s combination.
The setting of this variable has no effect if @code{window-nest} (see The setting of this variable has no effect if
below) is non-@code{nil}. @code{window-combination-limit} (see below) is non-@code{nil}.
@end defopt @end defopt
To illustrate the use of @code{window-splits} consider the following To illustrate the use of @code{window-splits} consider the following
...@@ -931,34 +932,36 @@ height: ...@@ -931,34 +932,36 @@ height:
@end group @end group
@end smallexample @end smallexample
@defopt window-nest @defopt window-combination-limit
If this variable is @code{nil}, @code{split-window} creates a new parent If this variable is @code{nil}, @code{split-window} creates a new parent
window if and only if the old window has no parent window or shall be window if and only if the old window has no parent window or shall be
split orthogonally to the combination it is part of. If this variable split orthogonally to the combination it is part of. If this variable
is non-@code{nil}, @code{split-window} always creates a new parent is @code{t}, @code{split-window} always creates a new parent window. If
window. If this variable is always non-@code{nil}, a frame's window this variable is always @code{t}, a frame's window tree is a binary tree
tree is a binary tree so every window but the frame's root window has so every window but the frame's root window has exactly one sibling.
exactly one sibling. Other values are reserved for future use.
The value of this variable is also assigned to the nest status of the The value of this variable is also assigned to the combination-limit
new parent window. The nest status of any window can be retrieved via status of the new parent window. The combination-limit status of any
the function @code{window-nest} and altered by the function window can be retrieved via the function @code{window-combination-limit}
@code{set-window-nest}, see below. and altered by the function @code{set-window-combination-limit}, see
below.
@end defopt @end defopt
@defun window-nest &optional window @defun window-combination-limit &optional window
This function returns the nest status of @var{window}. The argument This function returns the combination-limit status of @var{window}. The
@var{window} can be any window and defaults to the selected one. Note, argument @var{window} can be any window and defaults to the selected
however, that the nest status is currently meaningful for internal one. Note, however, that the combination-limit status is currently
windows only. meaningful for internal windows only.
@cindex nest status @cindex combination-limit status
The @dfn{nest status} of a window specifies whether that window may be The @dfn{combination-limit status} of a window specifies whether that
removed and its child windows recombined with that window's siblings window may be removed and its child windows recombined with that
when such a sibling's child window is deleted. The nest status is window's siblings when such a sibling's child window is deleted. The
initially assigned by @code{split-window} from the current value of the combination-limit status is initially assigned by @code{split-window}
variable @code{window-nest} (see above) and can be reset by the function from the current value of the variable @code{window-combination-limit}
@code{set-window-nest} (see below). (see above) and can be reset by the function
@code{set-window-combination-limit} (see below).
If the return value is @code{nil}, child windows of @var{window} may be If the return value is @code{nil}, child windows of @var{window} may be
recombined with @var{window}'s siblings when a window gets deleted. A recombined with @var{window}'s siblings when a window gets deleted. A
...@@ -966,16 +969,17 @@ return value of @code{nil} means that child windows of @var{window} are ...@@ -966,16 +969,17 @@ return value of @code{nil} means that child windows of @var{window} are
never (re-)combined with @var{window}'s siblings in such a case. never (re-)combined with @var{window}'s siblings in such a case.
@end defun @end defun
@defun set-window-nest window &optional status @defun set-window-combination-limit window &optional status
This functions sets the nest status (see above) of @var{window} to This functions sets the combination-limit status (see above) of
@var{status}. The argument @var{window} can be any window and defaults @var{window} to @var{status}. The argument @var{window} can be any
to the selected one. Note that setting the nest status is meaningful window and defaults to the selected one. Note that setting the
for internal windows only. The return value is @var{status}. combination-limit status is meaningful for internal windows only. The
return value is @var{status}.
@end defun @end defun
To illustrate the use of @code{window-nest} consider the following To illustrate the use of @code{window-combination-limit} consider the
configuration (throughout the following examples we shall assume that following configuration (throughout the following examples we shall
@code{window-splits} invariantly is @code{nil}). assume that @code{window-splits} invariantly is @code{nil}).
@smallexample @smallexample
@group @group
______________________________________ ______________________________________
...@@ -997,7 +1001,8 @@ configuration (throughout the following examples we shall assume that ...@@ -997,7 +1001,8 @@ configuration (throughout the following examples we shall assume that
@end smallexample @end smallexample
Splitting @code{W2} into two windows above each other with Splitting @code{W2} into two windows above each other with
@code{window-nest} equal @code{nil} will get you a configuration like: @code{window-combination-limit} equal @code{nil} will get you a
configuration like:
@smallexample @smallexample
@group @group
______________________________________ ______________________________________
...@@ -1064,9 +1069,9 @@ follows: ...@@ -1064,9 +1069,9 @@ follows:
Hence, with respect to the initial configuration, window @code{W2} has Hence, with respect to the initial configuration, window @code{W2} has
grown at the expense of window @code{W3}. If, however, in the initial grown at the expense of window @code{W3}. If, however, in the initial
configuration you had split @code{W2} with @code{window-nest} bound to configuration you had split @code{W2} with
@code{t}, a new internal window @code{W5} would have been created as @code{window-combination-limit} bound to @code{t}, a new internal window
depicted below. @code{W5} would have been created as depicted below.
@smallexample @smallexample
@group @group
______________________________________ ______________________________________
......
2011-11-16 Martin Rudalics <rudalics@gmx.at>
* window.el (split-window, window-state-get-1)
(window-state-put-1, window-state-put-2): Rename occurrences of
window-nest to window-combination-limit.
* cus-start.el (window-nest): Rename to
window-combination-limit.
2011-11-16 Chong Yidong <cyd@gnu.org> 2011-11-16 Chong Yidong <cyd@gnu.org>
* progmodes/autoconf.el (autoconf-mode): Fix comment-start-skip * progmodes/autoconf.el (autoconf-mode): Fix comment-start-skip
......
...@@ -401,7 +401,7 @@ since it could result in memory overflow and make Emacs crash." ...@@ -401,7 +401,7 @@ since it could result in memory overflow and make Emacs crash."
(const :tag "Only on ttys" :value tty) (const :tag "Only on ttys" :value tty)
(other :tag "Always" t)) "23.1") (other :tag "Always" t)) "23.1")
(window-splits windows boolean "24.1") (window-splits windows boolean "24.1")
(window-nest windows boolean "24.1") (window-combination-limit windows boolean "24.1")
;; xdisp.c ;; xdisp.c
(show-trailing-whitespace whitespace-faces boolean nil (show-trailing-whitespace whitespace-faces boolean nil
:safe booleanp) :safe booleanp)
......
...@@ -3083,9 +3083,9 @@ frame. The selected window is not changed by this function." ...@@ -3083,9 +3083,9 @@ frame. The selected window is not changed by this function."
(parent (window-parent window)) (parent (window-parent window))
(function (window-parameter window 'split-window)) (function (window-parameter window 'split-window))
(window-side (window-parameter window 'window-side)) (window-side (window-parameter window 'window-side))
;; Rebind `window-nest' since in some cases we may have to ;; Rebind `window-combination-limit' since in some cases we may
;; override its value. ;; have to override its value.
(window-nest window-nest) (window-combination-limit window-combination-limit)
atom-root) atom-root)
(window--check frame) (window--check frame)
...@@ -3109,15 +3109,15 @@ frame. The selected window is not changed by this function." ...@@ -3109,15 +3109,15 @@ frame. The selected window is not changed by this function."
(or (not parent) (or (not parent)
(not (window-parameter parent 'window-side)))) (not (window-parameter parent 'window-side))))
;; WINDOW is a side root window. To make sure that a new parent ;; WINDOW is a side root window. To make sure that a new parent
;; window gets created set `window-nest' to t. ;; window gets created set `window-combination-limit' to t.
(setq window-nest t)) (setq window-combination-limit t))
(when (and window-splits size (> size 0)) (when (and window-splits size (> size 0))
;; If `window-splits' is non-nil and SIZE is a non-negative ;; If `window-splits' is non-nil and SIZE is a non-negative
;; integer, we cannot reasonably resize other windows. Rather ;; integer, we cannot reasonably resize other windows. Rather
;; bind `window-nest' to t to make sure that subsequent window ;; bind `window-combination-limit' to t to make sure that
;; deletions are handled correctly. ;; subsequent window deletions are handled correctly.
(setq window-nest t)) (setq window-combination-limit t))
(let* ((parent-size (let* ((parent-size
;; `parent-size' is the size of WINDOW's parent, provided ;; `parent-size' is the size of WINDOW's parent, provided
...@@ -3126,7 +3126,7 @@ frame. The selected window is not changed by this function." ...@@ -3126,7 +3126,7 @@ frame. The selected window is not changed by this function."
;; `resize' non-nil means we are supposed to resize other ;; `resize' non-nil means we are supposed to resize other
;; windows in WINDOW's combination. ;; windows in WINDOW's combination.
(resize (resize
(and window-splits (not window-nest) (and window-splits (not window-combination-limit)
;; Resize makes sense in iso-combinations only. ;; Resize makes sense in iso-combinations only.
(window-combined-p window horizontal))) (window-combined-p window horizontal)))
;; `old-size' is the current size of WINDOW. ;; `old-size' is the current size of WINDOW.
...@@ -3206,7 +3206,8 @@ frame. The selected window is not changed by this function." ...@@ -3206,7 +3206,8 @@ frame. The selected window is not changed by this function."
;; Make new-parent non-nil if we need a new parent window; ;; Make new-parent non-nil if we need a new parent window;
;; either because we want to nest or because WINDOW is not ;; either because we want to nest or because WINDOW is not
;; iso-combined. ;; iso-combined.
(or window-nest (not (window-combined-p window horizontal)))) (or window-combination-limit
(not (window-combined-p window horizontal))))
(setq new-normal (setq new-normal
;; Make new-normal the normal size of the new window. ;; Make new-normal the normal size of the new window.
(cond (cond
...@@ -3584,7 +3585,7 @@ specific buffers." ...@@ -3584,7 +3585,7 @@ specific buffers."
(total-width . ,(window-total-size window t)) (total-width . ,(window-total-size window t))
(normal-height . ,(window-normal-size window)) (normal-height . ,(window-normal-size window))
(normal-width . ,(window-normal-size window t)) (normal-width . ,(window-normal-size window t))
(nest . ,(window-nest window)) (combination-limit . ,(window-combination-limit window))
,@(let (list) ,@(let (list)
(dolist (parameter (window-parameters window)) (dolist (parameter (window-parameters window))
(unless (memq (car parameter) (unless (memq (car parameter)
...@@ -3709,9 +3710,11 @@ value can be also stored on disk and read back in a new session." ...@@ -3709,9 +3710,11 @@ value can be also stored on disk and read back in a new session."
window-safe-min-width))) window-safe-min-width)))
(if (window-sizable-p window (- size) horizontal 'safe) (if (window-sizable-p window (- size) horizontal 'safe)
(let* ((window-nest (assq 'nest item))) (let* ((window-combination-limit
;; We must inherit the nesting, otherwise we might mess (assq 'combination-limit item)))
;; up handling of atomic and side window. ;; We must inherit the combiantion limit, otherwise
;; we might mess up handling of atomic and side
;; window.
(setq new (split-window window size horizontal))) (setq new (split-window window size horizontal)))
;; Give up if we can't resize window down to safe sizes. ;; Give up if we can't resize window down to safe sizes.
(error "Cannot resize window %s" window)) (error "Cannot resize window %s" window))
...@@ -3735,10 +3738,11 @@ value can be also stored on disk and read back in a new session." ...@@ -3735,10 +3738,11 @@ value can be also stored on disk and read back in a new session."
(dolist (item window-state-put-list) (dolist (item window-state-put-list)
(let ((window (car item)) (let ((window (car item))
(splits (cdr (assq 'splits item))) (splits (cdr (assq 'splits item)))
(nest (cdr (assq 'nest item))) (combination-limit (cdr (assq 'combination-limit item)))
(parameters (cdr (assq 'parameters item))) (parameters (cdr (assq 'parameters item)))
(state (cdr (assq 'buffer item)))) (state (cdr (assq 'buffer item))))
(when nest (set-window-nest window nest)) (when combination-limit
(set-window-combination-limit window combination-limit))
;; Process parameters. ;; Process parameters.
(when parameters (when parameters
(dolist (parameter parameters) (dolist (parameter parameters)
......
2011-11-16 Martin Rudalics <rudalics@gmx.at>
* window.h (window): Rename slot "nest" to "combination_limit".
* window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
(Fset_window_nest): Rename to Fset_window_combination_limit.
(Vwindow_nest): Rename to Vwindow_combination_limit.
(recombine_windows, make_parent_window, make_window)
(Fsplit_window_internal, saved_window)
(Fset_window_configuration, save_window_save): Rename all
occurrences of window_nest to window_combination_limit.
2011-11-15 Juanma Barranquero <lekktu@gmail.com> 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
* image.c (imagemagick_load_image): Fix typo. * image.c (imagemagick_load_image): Fix typo.
......
...@@ -465,32 +465,33 @@ Return nil if WINDOW has no previous sibling. */) ...@@ -465,32 +465,33 @@ Return nil if WINDOW has no previous sibling. */)
return decode_any_window (window)->prev; return decode_any_window (window)->prev;
} }
DEFUN ("window-nest", Fwindow_nest, Swindow_nest, 0, 1, 0, DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 0, 1, 0,
doc: /* Return nest status of window WINDOW. doc: /* Return combination limit of window WINDOW.
If WINDOW is omitted or nil, it defaults to the selected window. If WINDOW is omitted or nil, it defaults to the selected window.
If the return value is nil, child windows of WINDOW can be recombined with If the return value is nil, child windows of WINDOW can be recombined with
WINDOW's siblings. A return value of non-nil means that child windows of WINDOW's siblings. A return value of t means that child windows of
WINDOW are never \(re-)combined with WINDOW's siblings. */) WINDOW are never \(re-)combined with WINDOW's siblings. */)
(Lisp_Object window) (Lisp_Object window)
{ {
return decode_any_window (window)->nest; return decode_any_window (window)->combination_limit;
} }
DEFUN ("set-window-nest", Fset_window_nest, Sset_window_nest, 2, 2, 0, DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0,
doc: /* Set nest status of window WINDOW to STATUS; return STATUS. doc: /* Set combination limit of window WINDOW to STATUS; return STATUS.
If WINDOW is omitted or nil, it defaults to the selected window. If WINDOW is omitted or nil, it defaults to the selected window.
If STATUS is nil, child windows of WINDOW can be recombined with WINDOW's If STATUS is nil, child windows of WINDOW can be recombined with
siblings. STATUS non-nil means that child windows of WINDOW are never WINDOW's siblings. STATUS t means that child windows of WINDOW are
\(re-)combined with WINDOW's siblings. */) never \(re-)combined with WINDOW's siblings. Other values are reserved
for future use. */)
(Lisp_Object window, Lisp_Object status) (Lisp_Object window, Lisp_Object status)
{ {
register struct window *w = decode_any_window (window); register struct window *w = decode_any_window (window);
w->nest = status; w->combination_limit = status;
return w->nest; return w->combination_limit;
} }
DEFUN ("window-use-time", Fwindow_use_time, Swindow_use_time, 0, 1, 0, DEFUN ("window-use-time", Fwindow_use_time, Swindow_use_time, 0, 1, 0,
...@@ -1879,7 +1880,7 @@ recombine_windows (Lisp_Object window) ...@@ -1879,7 +1880,7 @@ recombine_windows (Lisp_Object window)
w = XWINDOW (window); w = XWINDOW (window);
parent = w->parent; parent = w->parent;
if (!NILP (parent) && NILP (w->nest)) if (!NILP (parent) && NILP (w->combination_limit))
{ {
p = XWINDOW (parent); p = XWINDOW (parent);
if (((!NILP (p->vchild) && !NILP (w->vchild)) if (((!NILP (p->vchild) && !NILP (w->vchild))
...@@ -3248,7 +3249,7 @@ make_parent_window (Lisp_Object window, int horflag) ...@@ -3248,7 +3249,7 @@ make_parent_window (Lisp_Object window, int horflag)
p->start = Qnil; p->start = Qnil;
p->pointm = Qnil; p->pointm = Qnil;
p->buffer = Qnil; p->buffer = Qnil;
p->nest = Qnil; p->combination_limit = Qnil;
p->window_parameters = Qnil; p->window_parameters = Qnil;
} }
...@@ -3295,7 +3296,7 @@ make_window (void) ...@@ -3295,7 +3296,7 @@ make_window (void)
w->start_at_line_beg = w->display_table = w->dedicated = Qnil; w->start_at_line_beg = w->display_table = w->dedicated = Qnil;
w->base_line_number = w->base_line_pos = w->region_showing = Qnil; w->base_line_number = w->base_line_pos = w->region_showing = Qnil;
w->column_number_displayed = w->redisplay_end_trigger = Qnil; w->column_number_displayed = w->redisplay_end_trigger = Qnil;
w->nest = w->window_parameters = Qnil; w->combination_limit = w->window_parameters = Qnil;
w->prev_buffers = w->next_buffers = Qnil; w->prev_buffers = w->next_buffers = Qnil;
/* Initialize non-Lisp data. */ /* Initialize non-Lisp data. */
w->desired_matrix = w->current_matrix = 0; w->desired_matrix = w->current_matrix = 0;
...@@ -3668,7 +3669,7 @@ set correctly. See the code of `split-window' for how this is done. */) ...@@ -3668,7 +3669,7 @@ set correctly. See the code of `split-window' for how this is done. */)
int horflag int horflag
/* HORFLAG is 1 when we split side-by-side, 0 otherwise. */ /* HORFLAG is 1 when we split side-by-side, 0 otherwise. */
= EQ (side, Qt) || EQ (side, Qleft) || EQ (side, Qright); = EQ (side, Qt) || EQ (side, Qleft) || EQ (side, Qright);
int do_nest = 0; int combination_limit = 0;
CHECK_WINDOW (old); CHECK_WINDOW (old);
o = XWINDOW (old); o = XWINDOW (old);
...@@ -3677,11 +3678,11 @@ set correctly. See the code of `split-window' for how this is done. */) ...@@ -3677,11 +3678,11 @@ set correctly. See the code of `split-window' for how this is done. */)
CHECK_NUMBER (total_size); CHECK_NUMBER (total_size);
/* Set do_nest to 1 if we have to make a new parent window. We do /* Set combination_limit to 1 if we have to make a new parent window.
that if either `window-nest' is non-nil, or OLD has no parent, or We do that if either `window-combination-limit' is t, or OLD has no
OLD is ortho-combined. */ parent, or OLD is ortho-combined. */
do_nest = combination_limit =
!NILP (Vwindow_nest) !NILP (Vwindow_combination_limit)
|| NILP (o->parent) || NILP (o->parent)
|| NILP (horflag || NILP (horflag
? (XWINDOW (o->parent)->hchild) ? (XWINDOW (o->parent)->hchild)
...@@ -3701,7 +3702,7 @@ set correctly. See the code of `split-window' for how this is done. */) ...@@ -3701,7 +3702,7 @@ set correctly. See the code of `split-window' for how this is done. */)
error ("Attempt to split minibuffer window"); error ("Attempt to split minibuffer window");
else if (XINT (total_size) < (horflag ? 2 : 1)) else if (XINT (total_size) < (horflag ? 2 : 1))
error ("Size of new window too small (after split)"); error ("Size of new window too small (after split)");
else if (!do_nest && !NILP (Vwindow_splits)) else if (!combination_limit && !NILP (Vwindow_splits))
/* `window-splits' non-nil means try to resize OLD's siblings /* `window-splits' non-nil means try to resize OLD's siblings
proportionally. */ proportionally. */
{ {
...@@ -3726,7 +3727,7 @@ set correctly. See the code of `split-window' for how this is done. */) ...@@ -3726,7 +3727,7 @@ set correctly. See the code of `split-window' for how this is done. */)
} }
/* This is our point of no return. */ /* This is our point of no return. */
if (do_nest) if (combination_limit)
{ {
/* Save the old value of o->normal_cols/lines. It gets corrupted /* Save the old value of o->normal_cols/lines. It gets corrupted
by make_parent_window and we need it below for assigning it to by make_parent_window and we need it below for assigning it to
...@@ -3735,8 +3736,9 @@ set correctly. See the code of `split-window' for how this is done. */) ...@@ -3735,8 +3736,9 @@ set correctly. See the code of `split-window' for how this is done. */)
make_parent_window (old, horflag); make_parent_window (old, horflag);
p = XWINDOW (o->parent); p = XWINDOW (o->parent);
/* Store value of `window-nest' in new parent's nest slot. */ /* Store value of `window-combination-limit' in new parent's
p->nest = Vwindow_nest; combination_limit slot. */
p->combination_limit = Vwindow_combination_limit;
/* These get applied below. */ /* These get applied below. */
p->new_total = horflag ? o->total_cols : o->total_lines; p->new_total = horflag ? o->total_cols : o->total_lines;
p->new_normal = new_normal; p->new_normal = new_normal;
...@@ -3923,7 +3925,7 @@ Signal an error when WINDOW is the only window on its frame. */) ...@@ -3923,7 +3925,7 @@ Signal an error when WINDOW is the only window on its frame. */)
/* Put SIBLING into PARENT's place. */ /* Put SIBLING into PARENT's place. */
replace_window (parent, sibling, 0); replace_window (parent, sibling, 0);
/* Have SIBLING inherit the following three slot values from /* Have SIBLING inherit the following three slot values from
PARENT (the nest slot is not inherited). */ PARENT (the combination_limit slot is not inherited). */
s->normal_cols = p->normal_cols; s->normal_cols = p->normal_cols;
s->normal_lines = p->normal_lines; s->normal_lines = p->normal_lines;
/* Mark PARENT as deleted. */ /* Mark PARENT as deleted. */
...@@ -5312,7 +5314,7 @@ struct saved_window ...@@ -5312,7 +5314,7 @@ struct saved_window
Lisp_Object left_margin_cols, right_margin_cols; Lisp_Object left_margin_cols, right_margin_cols;
Lisp_Object left_fringe_width, right_fringe_width, fringes_outside_margins; Lisp_Object left_fringe_width, right_fringe_width, fringes_outside_margins;
Lisp_Object scroll_bar_width, vertical_scroll_bar_type, dedicated; Lisp_Object scroll_bar_width, vertical_scroll_bar_type, dedicated;
Lisp_Object nest, window_parameters; Lisp_Object combination_limit, window_parameters;
}; };
#define SAVED_WINDOW_N(swv,n) \ #define SAVED_WINDOW_N(swv,n) \
...@@ -5543,7 +5545,7 @@ the return value is nil. Otherwise the value is t. */) ...@@ -5543,7 +5545,7 @@ the return value is nil. Otherwise the value is t. */)
w->scroll_bar_width = p->scroll_bar_width; w->scroll_bar_width = p->scroll_bar_width;
w->vertical_scroll_bar_type = p->vertical_scroll_bar_type; w->vertical_scroll_bar_type = p->vertical_scroll_bar_type;
w->dedicated = p->dedicated; w->dedicated = p->dedicated;
w->nest = p->nest; w->combination_limit = p->combination_limit;
w->window_parameters = p->window_parameters; w->window_parameters = p->window_parameters;
XSETFASTINT (w->last_modified, 0); XSETFASTINT (w->last_modified, 0);
XSETFASTINT (w->last_overlay_modified, 0); XSETFASTINT (w->last_overlay_modified, 0);
...@@ -5821,7 +5823,7 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) ...@@ -5821,7 +5823,7 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i)
p->scroll_bar_width = w->scroll_bar_width; p->scroll_bar_width = w->scroll_bar_width;
p->vertical_scroll_bar_type = w->vertical_scroll_bar_type; p->vertical_scroll_bar_type = w->vertical_scroll_bar_type;
p->dedicated = w->dedicated; p->dedicated = w->dedicated;
p->nest = w->nest; p->combination_limit = w->combination_limit;
p->window_parameters = w->window_parameters; p->window_parameters = w->window_parameters;
if (!NILP (w->buffer)) if (!NILP (w->buffer))
{ {
...@@ -6284,7 +6286,8 @@ freeze_window_starts (struct frame *f, int freeze_p) ...@@ -6284,7 +6286,8 @@ freeze_window_starts (struct frame *f, int freeze_p)
and the like. and the like.
This ignores a couple of things like the dedicatedness status of This ignores a couple of things like the dedicatedness status of
window, nest and the like. This might have to be fixed. */ window, combination_limit and the like. This might have to be
fixed. */
int int
compare_window_configurations (Lisp_Object configuration1, Lisp_Object configuration2, int ignore_positions) compare_window_configurations (Lisp_Object configuration1, Lisp_Object configuration2, int ignore_positions)
...@@ -6496,24 +6499,27 @@ variable is non-nil, splitting a window may resize all windows in the ...@@ -6496,24 +6499,27 @@ variable is non-nil, splitting a window may resize all windows in the
same combination. This also allows to split a window that is otherwise same combination. This also allows to split a window that is otherwise
too small or of fixed size. too small or of fixed size.
This variable takes no effect if `window-nest' is non-nil. */); This variable takes no effect if `window-combination-limit' is non-nil. */);
Vwindow_splits = Qnil; Vwindow_splits = Qnil;
DEFVAR_LISP ("window-nest", Vwindow_nest, DEFVAR_LISP ("window-combination-limit", Vwindow_combination_limit,
doc: /* Non-nil means splitting a window makes a new parent window. doc: /* Non-nil means splitting a window makes a new parent window.
If this variable is nil, splitting a window will create a new parent If this variable is nil, splitting a window will create a new parent
window only if the window has no parent window or the window shall window only if the window has no parent window or the window shall
become a combination orthogonal to the one it it is part of. become a combination orthogonal to the one it it is part of.
If this variable is non-nil, splitting a window always creates a new If this variable is t, splitting a window always creates a new parent
parent window. If all splits behave this way, each frame's window tree window. If all splits behave this way, each frame's window tree is a
is a binary tree and every window but the frame's root window has binary tree and every window but the frame's root window has exactly one
exactly one sibling. sibling.
The value of this variable is also assigned to the nest status of the Other values are reserved for future use.
new parent window. The nest status of a window can be retrieved via the
function `window-nest' and altered by the function `set-window-nest'. */); The value of this variable is also assigned to the combination_limit
Vwindow_nest = Qnil; status of the new parent window. The combination-limit status of a
window can be retrieved via the function `window-combination-limit' and
altered by the function `set-window-combination-limit'. */);
Vwindow_combination_limit = Qnil;
defsubr (&Sselected_window); defsubr (&Sselected_window);
defsubr (&Sminibuffer_window); defsubr (&Sminibuffer_window);
...@@ -6533,8 +6539,8 @@ function `window-nest' and altered by the function `set-window-nest'. */); ...@@ -6533,8 +6539,8 @@ function `window-nest' and altered by the function `set-window-nest'. */);
defsubr (&Swindow_left_child); defsubr (&Swindow_left_child);
defsubr (&Swindow_next_sibling); defsubr (&Swindow_next_sibling);
defsubr (&Swindow_prev_sibling); defsubr (&Swindow_prev_sibling);
defsubr (&Swindow_nest); defsubr (&Swindow_combination_limit);
defsubr (&Sset_window_nest); defsubr (&Sset_window_combination_limit);
defsubr (&Swindow_use_time); defsubr (&Swindow_use_time);
defsubr (&Swindow_top_line); defsubr (&Swindow_top_line);
defsubr (&Swindow_left_column); defsubr (&Swindow_left_column);
......
...@@ -258,9 +258,8 @@ struct window ...@@ -258,9 +258,8 @@ struct window
must run the redisplay-end-trigger-hook. */ must run the redisplay-end-trigger-hook. */
Lisp_Object redisplay_end_trigger;