+2011-11-17 Martin Rudalics <rudalics@gmx.at>
+
+ * windows.texi (Resizing Windows, Splitting Windows)
+ (Deleting Windows): Use term window-combination-resize instead
+ of window-splits.
+
2011-11-16 Martin Rudalics <rudalics@gmx.at>
* windows.texi (Resizing Windows, Splitting Windows): Rename
function @code{window-resizable} above.
The choice of which window edges this function alters depends on the
-values of the option @code{window-splits} and the combination-limit
-status of the involved windows; in some cases, it may alter both edges.
-@xref{Splitting Windows}. To resize by moving only the bottom or right
-edge of a window, use the function @code{adjust-window-trailing-edge},
-below.
+values of the option @code{window-combination-resize} and the
+combination-limit status of the involved windows; in some cases, it may
+alter both edges. @xref{Splitting Windows}. To resize by moving only
+the bottom or right edge of a window, use the function
+@code{adjust-window-trailing-edge}, below.
@end defun
@c The commands enlarge-window, enlarge-window-horizontally,
The following two options can be used to modify the operation of
@code{split-window}.
-@defopt window-splits
+@defopt window-combination-resize
If this variable is @code{nil}, @code{split-window} can only split a
window (denoted by @var{window}) if @var{window}'s screen area is
large enough to accommodate both itself and the new window. This is
@code{window-combination-limit} (see below) is non-@code{nil}.
@end defopt
-To illustrate the use of @code{window-splits} consider the following
-window configuration:
+To illustrate the use of @code{window-combination-resize} consider the
+following window configuration:
@smallexample
@group
______________________________________
@end group
@end smallexample
-Splitting window @code{W3} with @code{window-splits} @code{nil}
-produces a configuration where the size of @code{W2} remains unchanged:
+Splitting window @code{W3} with @code{window-combination-resize}
+@code{nil} produces a configuration where the size of @code{W2} remains
+unchanged:
@smallexample
@group
______________________________________
@end group
@end smallexample
-Splitting @code{W3} with @code{window-splits} non-@code{nil} instead
-produces a configuration where all windows have approximately the same
-height:
-
+Splitting @code{W3} with @code{window-combination-resize} non-@code{nil}
+instead steals the space for @code{W4} from both @code{W2} and @code{W3}:
@smallexample
@group
______________________________________
To illustrate the use of @code{window-combination-limit} consider the
following configuration (throughout the following examples we shall
-assume that @code{window-splits} invariantly is @code{nil}).
+assume that @code{window-combination-resize} invariantly is @code{nil}).
@smallexample
@group
______________________________________
function, that function is called with @var{window} as its sole
argument.
-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.
+If @code{window-combination-resize} (@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-combination-resize} 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
display actions, taking precedence over `display-buffer-base-action'.
+++
-*** New option `window-nest'.
-The new option `window-nest' allows to return the space obtained for
-resizing or creating a window more reliably to the window from which
-such space was obtained.
+*** New option `window-combination-limit'.
+The new option `window-combination-limit' allows to return the space
+obtained for resizing or creating a window more reliably to the window
+from which such space was obtained.
+++
-*** New option `window-splits'.
-The new option `window-splits' allows to split a window that otherwise
-cannot be split because it's too small by stealing space from other
-windows in the same combination.
+*** New option `window-combination-resize'.
+The new option `window-combination-resize' allows to split a window that
+otherwise cannot be split because it's too small by stealing space from
+other windows in the same combination. Subsequent resizing or deletion
+of the window will resize all windows in the same combination as well.
+++
*** New commands `maximize-window' and `minimize-window'.
+2011-11-17 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (window-resize, delete-window, split-window):
+ Replace window-splits by window-combination-resize.
+ * cus-start.el (window-splits): Replace by
+ window-combination-resize.
+
2011-11-17 Glenn Morris <rgm@gnu.org>
* progmodes/sh-script.el (sh-font-lock-keywords-var):
(const :tag "Never (nil)" :value nil)
(const :tag "Only on ttys" :value tty)
(other :tag "Always" t)) "23.1")
- (window-splits windows boolean "24.1")
+ (window-combination-resize windows boolean "24.1")
(window-combination-limit windows boolean "24.1")
;; xdisp.c
(show-trailing-whitespace whitespace-faces boolean nil
((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)
+ (if (and (not window-combination-resize)
(window-combined-p window horizontal)
(setq sibling (or (window-right window) (window-left window)))
(window-sizable-p sibling (- delta) horizontal ignore))
- ;; If window-splits is nil, WINDOW is part of an
+ ;; If window-combination-resize 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
(sibling (or (window-left window) (window-right window))))
(window--resize-reset frame horizontal)
(cond
- ((and (not window-splits) sibling (window-sizable-p sibling size))
+ ((and (not window-combination-resize)
+ sibling (window-sizable-p sibling size))
;; Resize WINDOW's sibling.
(window--resize-this-window sibling size horizontal nil t)
(set-window-new-normal
;; window gets created set `window-combination-limit' to t.
(setq window-combination-limit t))
- (when (and window-splits size (> size 0))
- ;; If `window-splits' is non-nil and SIZE is a non-negative
- ;; integer, we cannot reasonably resize other windows. Rather
- ;; bind `window-combination-limit' to t to make sure that
- ;; subsequent window deletions are handled correctly.
+ (when (and window-combination-resize size (> size 0))
+ ;; If `window-combination-resize' is non-nil and SIZE is a
+ ;; non-negative integer, we cannot reasonably resize other
+ ;; windows. Rather bind `window-combination-limit' to t to make
+ ;; sure that subsequent window deletions are handled correctly.
(setq window-combination-limit t))
(let* ((parent-size
;; `resize' non-nil means we are supposed to resize other
;; windows in WINDOW's combination.
(resize
- (and window-splits (not window-combination-limit)
+ (and window-combination-resize (not window-combination-limit)
;; Resize makes sense in iso-combinations only.
(window-combined-p window horizontal)))
;; `old-size' is the current size of WINDOW.
+2011-11-17 Martin Rudalics <rudalics@gmx.at>
+
+ * window.c (Vwindow_splits): Rename to
+ Vwindow_combination_resize. Suggested by Juri Linkov.
+ (Fsplit_window_internal): Use Vwindow_combination_resize instead
+ of Vwindow_splits.
+
2011-11-16 Juanma Barranquero <lekktu@gmail.com>
* nsfns.m (Fns_font_name):
error ("Attempt to split minibuffer window");
else if (XINT (total_size) < (horflag ? 2 : 1))
error ("Size of new window too small (after split)");
- else if (!combination_limit && !NILP (Vwindow_splits))
- /* `window-splits' non-nil means try to resize OLD's siblings
+ else if (!combination_limit && !NILP (Vwindow_combination_resize))
+ /* `window-combination-resize' non-nil means try to resize OLD's siblings
proportionally. */
{
p = XWINDOW (o->parent);
frame to be redrawn only if it is a tty frame. */);
Vrecenter_redisplay = Qtty;
- DEFVAR_LISP ("window-splits", Vwindow_splits,
- doc: /* Non-nil means splitting windows is handled specially.
+ DEFVAR_LISP ("window-combination-resize", Vwindow_combination_resize,
+ doc: /* Non-nil means resize window combinations proportionally.
If this variable is nil, splitting a window gets the entire screen space
-for displaying the new window from the window to split. If this
-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
-too small or of fixed size.
+for displaying the new window from the window to split. Deleting and
+resizing a windwo preferably resizes one adjacent window only.
+
+If this variable is non-nil, splitting a window tries to get the space
+proportionally from all windows in the same combination. This also
+allows to split a window that is otherwise too small or of fixed size.
+Resizing and deleting a window proportionally resize all windows in the
+same combination.
This variable takes no effect if `window-combination-limit' is non-nil. */);
- Vwindow_splits = Qnil;
+ Vwindow_combination_resize = Qnil;
DEFVAR_LISP ("window-combination-limit", Vwindow_combination_limit,
doc: /* Non-nil means splitting a window makes a new parent window.