* window.h (window): Remove splits slot.
* window.c (Fwindow_splits, Fset_window_splits): Remove.
(Fdelete_other_windows_internal, make_parent_window)
(make_window, Fsplit_window_internal, Fdelete_window_internal)
(Fset_window_configuration, save_window_save): Don't deal with
split status of windows.
(saved_window): Remove splits slot.
(Vwindow_splits): Rewrite doc-string.
* window.el (window-resize, delete-window): Use window-splits
variable instead of function.
(window-state-get-1, window-state-put-2, window-state-put):
Don't deal with windows' splits status.
* windows.texi (Splitting Windows, Deleting Windows): Remove
references to splits status of windows.
+2011-11-12 Martin Rudalics <rudalics@gmx.at>
+
+ * windows.texi (Splitting Windows, Deleting Windows): Remove
+ references to splits status of windows.
+
2011-11-10 Glenn Morris <rgm@gnu.org>
* buffers.texi (Read Only Buffers): Expand a bit on why
this may allow @code{split-window} to succeed even if @var{window} is
a fixed-size window or too small to ordinarily split.
-In any case, the value of this variable is assigned to the splits status
-of the new window and, provided old and new window form a new
-combination, of the old window as well. The splits status of a window
-can be retrieved by invoking the function @code{window-splits} and
-altered by the function @code{set-window-splits} described next.
-
-If @code{window-nest} (see below) is non-@code{nil}, the space for the
-new window is exclusively taken from the old window, but the splits
-status of the involved windows is nevertheless set as described here.
-@end defopt
-
-@defun window-splits &optional window
-This function returns the splits status of @var{window}. The argument
-@var{window} can be any window and defaults to the selected one.
-
-@cindex splits status
-The @dfn{splits status} of a window specifies how resizing and deleting
-that window may affect the size of other windows in the same window
-combination. More precisely, if @var{window}'s splits status is
-@code{nil} and @var{window} is resized, the corresponding space is
-preferably taken from (or given to) @var{window}'s right sibling. When
-@var{window} is deleted, its space is given to its left sibling. If
-@var{window}'s splits status is non-@code{nil}, resizing and deleting
-@var{window} may resize @emph{all} windows in @var{window}'s
-combination.
-
-The splits status is initially set by @code{split-window}
-from the current value of the variable @code{window-splits} (see above)
-and can be reset by the function @code{set-window-splits} (see below).
-@end defun
+Also if this variable is non-@code{nil}, subsequent resizing and
+deleting @var{window} will usually affect @emph{all} windows in
+@var{window}'s combination.
-@defun set-window-splits window &optional status
-This function sets the splits status (see above) of @var{window} to
-@var{status}. The argument @var{window} can be any window and defaults
-to the selected one. The return value is @var{status}.
-@end defun
+The setting of this variable has no effect if @code{window-nest} (see
+below) is non-@code{nil}.
+@end defopt
To illustrate the use of @code{window-splits} consider the following
window configuration:
function, that function is called with @var{window} as its sole
argument.
-If the splits status of @var{window} (@pxref{Splitting Windows}) is
-@code{nil}, the space @var{window} took up is given to its left sibling
-if such a window exists and to its right sibling otherwise. If the
-splits status of @var{window} is non-@code{nil}, its space is
-proportionally distributed among the remaining windows in the same
-combination.
+If @code{window-splits} (@pxref{Splitting Windows}) is @code{nil}, the
+space @var{window} took up is given to its left sibling if such a window
+exists and to its right sibling otherwise. If @code{window-splits} is
+non-@code{nil}, the space of @var{window} is proportionally distributed
+among the remaining windows in the same combination.
@end deffn
@deffn Command delete-other-windows &optional window
+2011-11-12 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (window-resize, delete-window): Use window-splits
+ variable instead of function.
+ (window-state-get-1, window-state-put-2, window-state-put):
+ Don't deal with windows' splits status.
+
2011-11-12 Glenn Morris <rgm@gnu.org>
* apropos.el (apropos-do-all, apropos-library, apropos-value)
((window--resizable-p window delta horizontal ignore)
(window--resize-reset frame horizontal)
(window--resize-this-window window delta horizontal ignore t)
- (if (and (not (window-splits window))
+ (if (and (not window-splits)
(window-combined-p window horizontal)
(setq sibling (or (window-right window) (window-left window)))
(window-sizable-p sibling (- delta) horizontal ignore))
- ;; If window-splits returns nil for WINDOW, WINDOW is part of
- ;; an iso-combination, and WINDOW's neighboring right or left
+ ;; If window-splits is nil, WINDOW is part of an
+ ;; iso-combination, and WINDOW's neighboring right or left
;; sibling can be resized as requested, resize that sibling.
(let ((normal-delta
(/ (float delta)
(sibling (or (window-left window) (window-right window))))
(window--resize-reset frame horizontal)
(cond
- ((and (not (window-splits window))
- sibling (window-sizable-p sibling size))
+ ((and (not window-splits) sibling (window-sizable-p sibling size))
;; Resize WINDOW's sibling.
(window--resize-this-window sibling size horizontal nil t)
(set-window-new-normal
(total-width . ,(window-total-size window t))
(normal-height . ,(window-normal-size window))
(normal-width . ,(window-normal-size window t))
- (splits . ,(window-splits window))
(nest . ,(window-nest window))
,@(let (list)
(dolist (parameter (window-parameters window))
(nest (cdr (assq 'nest item)))
(parameters (cdr (assq 'parameters item)))
(state (cdr (assq 'buffer item))))
- (when splits (set-window-splits window splits))
(when nest (set-window-nest window nest))
;; Process parameters.
(when parameters
(cdr (assq 'total-width state)))))
(min-height (cdr (assq 'min-height head)))
(min-width (cdr (assq 'min-width head)))
- window-splits selected)
+ selected)
(if (and (not totals)
(or (> min-height (window-total-size window))
(> min-width (window-total-size window t)))
+2011-11-12 Martin Rudalics <rudalics@gmx.at>
+
+ * window.h (window): Remove splits slot.
+ * window.c (Fwindow_splits, Fset_window_splits): Remove.
+ (Fdelete_other_windows_internal, make_parent_window)
+ (make_window, Fsplit_window_internal, Fdelete_window_internal)
+ (Fset_window_configuration, save_window_save): Don't deal with
+ split status of windows.
+ (saved_window): Remove splits slot.
+ (Vwindow_splits): Rewrite doc-string.
+
2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
* xfns.c (unwind_create_frame):
return decode_any_window (window)->prev;
}
-DEFUN ("window-splits", Fwindow_splits, Swindow_splits, 0, 1, 0,
- doc: /* Return splits status for the window WINDOW.
-If WINDOW is omitted or nil, it defaults to the selected window.
-
-If the value returned by this function is nil and WINDOW is resized, the
-corresponding space is preferably taken from (or given to) WINDOW's
-right sibling. When WINDOW is deleted, its space is given to its left
-sibling.
-
-If the value returned by this function is non-nil, resizing and deleting
-WINDOW may resize all windows in the same combination. */)
- (Lisp_Object window)
-{
- return decode_any_window (window)->splits;
-}
-
-DEFUN ("set-window-splits", Fset_window_splits, Sset_window_splits, 2, 2, 0,
- doc: /* Set splits status of window WINDOW to STATUS.
-If WINDOW is omitted or nil, it defaults to the selected window.
-
-If STATUS is nil and WINDOW is later resized, the corresponding space is
-preferably taken from (or given to) WINDOW's right sibling. When WINDOW
-is deleted, its space is given to its left sibling.
-
-If STATUS is non-nil, resizing and deleting WINDOW may resize all
-windows in the same combination. */)
- (Lisp_Object window, Lisp_Object status)
-{
- register struct window *w = decode_any_window (window);
-
- w->splits = status;
-
- return w->splits;
-}
-
DEFUN ("window-nest", Fwindow_nest, Swindow_nest, 0, 1, 0,
doc: /* Return nest status of window WINDOW.
If WINDOW is omitted or nil, it defaults to the selected window.
replace_window (root, window, 1);
- /* Reset WINDOW's splits status. */
- w->splits = Qnil;
-
/* This must become SWINDOW anyway ....... */
if (!NILP (w->buffer) && !resize_failed)
{
p->start = Qnil;
p->pointm = Qnil;
p->buffer = Qnil;
- p->splits = Qnil;
p->nest = Qnil;
p->window_parameters = 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->column_number_displayed = w->redisplay_end_trigger = Qnil;
- w->splits = w->nest = w->window_parameters = Qnil;
+ w->nest = w->window_parameters = Qnil;
w->prev_buffers = w->next_buffers = Qnil;
/* Initialize non-Lisp data. */
w->desired_matrix = w->current_matrix = 0;
p = XWINDOW (o->parent);
/* Store value of `window-nest' in new parent's nest slot. */
p->nest = Vwindow_nest;
- /* Have PARENT inherit splits slot value from OLD. */
- p->splits = o->splits;
- /* Store value of `window-splits' in OLD's splits slot. */
- o->splits = Vwindow_splits;
/* These get applied below. */
p->new_total = horflag ? o->total_cols : o->total_lines;
p->new_normal = new_normal;
n->scroll_bar_width = r->scroll_bar_width;
n->vertical_scroll_bar_type = r->vertical_scroll_bar_type;
- /* Store `window-splits' in NEW's splits slot. */
- n->splits = Vwindow_splits;
-
/* Directly assign orthogonal coordinates and sizes. */
if (horflag)
{
PARENT (the nest slot is not inherited). */
s->normal_cols = p->normal_cols;
s->normal_lines = p->normal_lines;
- s->splits = p->splits;
/* Mark PARENT as deleted. */
p->vchild = p->hchild = Qnil;
/* Try to merge SIBLING into its new parent. */
Lisp_Object left_margin_cols, right_margin_cols;
Lisp_Object left_fringe_width, right_fringe_width, fringes_outside_margins;
Lisp_Object scroll_bar_width, vertical_scroll_bar_type, dedicated;
- Lisp_Object splits, nest, window_parameters;
+ Lisp_Object nest, window_parameters;
};
#define SAVED_WINDOW_N(swv,n) \
w->scroll_bar_width = p->scroll_bar_width;
w->vertical_scroll_bar_type = p->vertical_scroll_bar_type;
w->dedicated = p->dedicated;
- w->splits = p->splits;
w->nest = p->nest;
w->window_parameters = p->window_parameters;
XSETFASTINT (w->last_modified, 0);
p->scroll_bar_width = w->scroll_bar_width;
p->vertical_scroll_bar_type = w->vertical_scroll_bar_type;
p->dedicated = w->dedicated;
- p->splits = w->splits;
p->nest = w->nest;
p->window_parameters = w->window_parameters;
if (!NILP (w->buffer))
and the like.
This ignores a couple of things like the dedicatedness status of
- window, splits, nest and the like. This might have to be fixed. */
+ window, nest and the like. This might have to be fixed. */
int
compare_window_configurations (Lisp_Object configuration1, Lisp_Object configuration2, int ignore_positions)
same combination. This also allows to split a window that is otherwise
too small or of fixed size.
-The value of this variable is also assigned to the split status of the
-new window and, provided the old and new window form a new combination,
-to the window that was split as well. The split status of a window can
-be retrieved with the function `window-splits' and altered by the
-function `set-window-splits'.
-
-If the value of the variable `window-nest' is non-nil, the space for the
-new window is exclusively taken from the window that shall be split, but
-the split status of the window that is split as well as that of the new
-window are still set to the value of this variable. */);
+This variable takes no effect if `window-nest' is non-nil. */);
Vwindow_splits = Qnil;
DEFVAR_LISP ("window-nest", Vwindow_nest,
defsubr (&Swindow_left_child);
defsubr (&Swindow_next_sibling);
defsubr (&Swindow_prev_sibling);
- defsubr (&Swindow_splits);
- defsubr (&Sset_window_splits);
defsubr (&Swindow_nest);
defsubr (&Sset_window_nest);
defsubr (&Swindow_use_time);
must run the redisplay-end-trigger-hook. */
Lisp_Object redisplay_end_trigger;
- /* Non-nil means deleting or resizing this window distributes
- space among all windows in the same combination. */
- Lisp_Object splits;
-
/* Non-nil means this window's child windows are never
(re-)combined. */
Lisp_Object nest;