emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106356: Don't handle splits status.


From: martin rudalics
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106356: Don't handle splits status.
Date: Sat, 12 Nov 2011 10:55:50 +0100
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106356
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Sat 2011-11-12 10:55:50 +0100
message:
  Don't handle splits status.
  
  * 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.
modified:
  doc/lispref/ChangeLog
  doc/lispref/windows.texi
  lisp/ChangeLog
  lisp/window.el
  src/ChangeLog
  src/window.c
  src/window.h
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2011-11-10 02:17:45 +0000
+++ b/doc/lispref/ChangeLog     2011-11-12 09:55:50 +0000
@@ -1,3 +1,8 @@
+2011-11-12  Martin Rudalics  <address@hidden>
+
+       * windows.texi (Splitting Windows, Deleting Windows): Remove
+       references to splits status of windows.
+
 2011-11-10  Glenn Morris  <address@hidden>
 
        * buffers.texi (Read Only Buffers): Expand a bit on why

=== modified file 'doc/lispref/windows.texi'
--- a/doc/lispref/windows.texi  2011-11-09 14:37:25 +0000
+++ b/doc/lispref/windows.texi  2011-11-12 09:55:50 +0000
@@ -855,43 +855,14 @@
 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.
+Also if this variable is address@hidden, subsequent resizing and
+deleting @var{window} will usually affect @emph{all} windows in
address@hidden's combination.
 
-If @code{window-nest} (see below) is address@hidden, 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.
+The setting of this variable has no effect if @code{window-nest} (see
+below) is address@hidden
 @end defopt
 
address@hidden window-splits &optional window
-This function returns the splits status of @var{window}.  The argument
address@hidden can be any window and defaults to the selected one.
-
address@hidden 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
address@hidden and @var{window} is resized, the corresponding space is
-preferably taken from (or given to) @var{window}'s right sibling.  When
address@hidden is deleted, its space is given to its left sibling.  If
address@hidden's splits status is address@hidden, resizing and deleting
address@hidden 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).
address@hidden defun
-
address@hidden set-window-splits window &optional status
-This function sets the splits status (see above) of @var{window} to
address@hidden  The argument @var{window} can be any window and defaults
-to the selected one.  The return value is @var{status}.
address@hidden defun
-
 To illustrate the use of @code{window-splits} consider the following
 window configuration:
 @smallexample
@@ -1208,12 +1179,11 @@
 function, that function is called with @var{window} as its sole
 argument.
 
-If the splits status of @var{window} (@pxref{Splitting Windows}) is
address@hidden, 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 address@hidden, 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
address@hidden, 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

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-11-12 02:13:23 +0000
+++ b/lisp/ChangeLog    2011-11-12 09:55:50 +0000
@@ -1,3 +1,10 @@
+2011-11-12  Martin Rudalics  <address@hidden>
+
+       * 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  <address@hidden>
 
        * apropos.el (apropos-do-all, apropos-library, apropos-value)

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2011-11-11 10:23:23 +0000
+++ b/lisp/window.el    2011-11-12 09:55:50 +0000
@@ -1482,12 +1482,12 @@
      ((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)
@@ -2389,8 +2389,7 @@
             (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
@@ -3585,7 +3584,6 @@
             (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))
@@ -3740,7 +3738,6 @@
          (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
@@ -3828,7 +3825,7 @@
                  (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)))

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-11-11 18:33:30 +0000
+++ b/src/ChangeLog     2011-11-12 09:55:50 +0000
@@ -1,3 +1,14 @@
+2011-11-12  Martin Rudalics  <address@hidden>
+
+       * 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  <address@hidden>
 
        * xfns.c (unwind_create_frame):

=== modified file 'src/window.c'
--- a/src/window.c      2011-11-09 14:29:23 +0000
+++ b/src/window.c      2011-11-12 09:55:50 +0000
@@ -465,41 +465,6 @@
   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.
@@ -2769,9 +2734,6 @@
 
   replace_window (root, window, 1);
 
-  /* Reset WINDOW's splits status.  */
-  w->splits = Qnil;
-
   /* This must become SWINDOW anyway ....... */
   if (!NILP (w->buffer) && !resize_failed)
     {
@@ -3286,7 +3248,6 @@
   p->start = Qnil;
   p->pointm = Qnil;
   p->buffer = Qnil;
-  p->splits = Qnil;
   p->nest = Qnil;
   p->window_parameters = Qnil;
 }
@@ -3334,7 +3295,7 @@
   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;
@@ -3776,10 +3737,6 @@
       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;
@@ -3830,9 +3787,6 @@
   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)
     {
@@ -3972,7 +3926,6 @@
             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.  */
@@ -5359,7 +5312,7 @@
   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) \
@@ -5590,7 +5543,6 @@
          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);
@@ -5869,7 +5821,6 @@
       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))
@@ -6333,7 +6284,7 @@
    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)
@@ -6545,16 +6496,7 @@
 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,
@@ -6591,8 +6533,6 @@
   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);

=== modified file 'src/window.h'
--- a/src/window.h      2011-11-07 09:51:08 +0000
+++ b/src/window.h      2011-11-12 09:55:50 +0000
@@ -258,10 +258,6 @@
        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;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]