emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106392: Rename window-nest to window


From: martin rudalics
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106392: Rename window-nest to window-combination-limit.
Date: Wed, 16 Nov 2011 11:10:40 +0100
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106392
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Wed 2011-11-16 11:10:40 +0100
message:
  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.
modified:
  doc/lispref/ChangeLog
  doc/lispref/windows.texi
  lisp/ChangeLog
  lisp/cus-start.el
  lisp/window.el
  src/ChangeLog
  src/window.c
  src/window.h
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2011-11-14 21:00:24 +0000
+++ b/doc/lispref/ChangeLog     2011-11-16 10:10:40 +0000
@@ -1,3 +1,8 @@
+2011-11-16  Martin Rudalics  <address@hidden>
+
+       * windows.texi (Resizing Windows, Splitting Windows): Rename
+       occurrences of window-nest to window-combination-limit.
+
 2011-11-14  Juanma Barranquero  <address@hidden>
 
        * intro.texi (Lisp History): Fix typo.

=== modified file 'doc/lispref/windows.texi'
--- a/doc/lispref/windows.texi  2011-11-12 09:55:50 +0000
+++ b/doc/lispref/windows.texi  2011-11-16 10:10:40 +0000
@@ -632,11 +632,12 @@
 The optional argument @var{ignore} has the same meaning as for the
 function @code{window-resizable} above.
 
-The choice of which window edge this function alters depends on the
-splitting and nesting 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
address@hidden, below.
+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.
address@hidden 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,
@@ -859,8 +860,8 @@
 deleting @var{window} will usually affect @emph{all} windows in
 @var{window}'s combination.
 
-The setting of this variable has no effect if @code{window-nest} (see
-below) is address@hidden
+The setting of this variable has no effect if
address@hidden (see below) is address@hidden
 @end defopt
 
 To illustrate the use of @code{window-splits} consider the following
@@ -931,34 +932,36 @@
 @end group
 @end smallexample
 
address@hidden window-nest
address@hidden window-combination-limit
 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
 split orthogonally to the combination it is part of.  If this variable
-is address@hidden, @code{split-window} always creates a new parent
-window.  If this variable is always address@hidden, a frame's window
-tree is a binary tree so every window but the frame's root window has
-exactly one sibling.
+is @code{t}, @code{split-window} always creates a new parent window.  If
+this variable is always @code{t}, a frame's window tree is a binary tree
+so every window but the frame's root window has exactly one sibling.
+Other values are reserved for future use.
 
-The value of this variable is also assigned to the nest status of the
-new parent window.  The nest status of any window can be retrieved via
-the function @code{window-nest} and altered by the function
address@hidden, see below.
+The value of this variable is also assigned to the combination-limit
+status of the new parent window.  The combination-limit status of any
+window can be retrieved via the function @code{window-combination-limit}
+and altered by the function @code{set-window-combination-limit}, see
+below.
 @end defopt
 
address@hidden window-nest &optional window
-This function returns the nest status of @var{window}.  The argument
address@hidden can be any window and defaults to the selected one.  Note,
-however, that the nest status is currently meaningful for internal
-windows only.
address@hidden window-combination-limit &optional window
+This function returns the combination-limit status of @var{window}.  The
+argument @var{window} can be any window and defaults to the selected
+one.  Note, however, that the combination-limit status is currently
+meaningful for internal windows only.
 
address@hidden nest status
-The @dfn{nest status} of a window specifies whether that window may be
-removed and its child windows recombined with that window's siblings
-when such a sibling's child window is deleted.  The nest status is
-initially assigned by @code{split-window} from the current value of the
-variable @code{window-nest} (see above) and can be reset by the function
address@hidden (see below).
address@hidden combination-limit status
+The @dfn{combination-limit status} of a window specifies whether that
+window may be removed and its child windows recombined with that
+window's siblings when such a sibling's child window is deleted.  The
+combination-limit status is initially assigned by @code{split-window}
+from the current value of the variable @code{window-combination-limit}
+(see above) and can be reset by the function
address@hidden (see below).
 
 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
@@ -966,16 +969,17 @@
 never (re-)combined with @var{window}'s siblings in such a case.
 @end defun
 
address@hidden set-window-nest window &optional status
-This functions sets the nest status (see above) of @var{window} to
address@hidden  The argument @var{window} can be any window and defaults
-to the selected one.  Note that setting the nest status is meaningful
-for internal windows only.  The return value is @var{status}.
address@hidden set-window-combination-limit window &optional status
+This functions sets the combination-limit status (see above) of
address@hidden to @var{status}.  The argument @var{window} can be any
+window and defaults to the selected one.  Note that setting the
+combination-limit status is meaningful for internal windows only.  The
+return value is @var{status}.
 @end defun
 
-To illustrate the use of @code{window-nest} consider the following
-configuration (throughout the following examples we shall assume that
address@hidden invariantly is @code{nil}).
+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}).
 @smallexample
 @group
      ______________________________________
@@ -997,7 +1001,8 @@
 @end smallexample
 
 Splitting @code{W2} into two windows above each other with
address@hidden equal @code{nil} will get you a configuration like:
address@hidden equal @code{nil} will get you a
+configuration like:
 @smallexample
 @group
      ______________________________________
@@ -1064,9 +1069,9 @@
 
 Hence, with respect to the initial configuration, window @code{W2} has
 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
address@hidden, a new internal window @code{W5} would have been created as
-depicted below.
+configuration you had split @code{W2} with
address@hidden bound to @code{t}, a new internal window
address@hidden would have been created as depicted below.
 @smallexample
 @group
      ______________________________________

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-11-16 03:17:29 +0000
+++ b/lisp/ChangeLog    2011-11-16 10:10:40 +0000
@@ -1,3 +1,11 @@
+2011-11-16  Martin Rudalics  <address@hidden>
+
+       * 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  <address@hidden>
 
        * progmodes/autoconf.el (autoconf-mode): Fix comment-start-skip

=== modified file 'lisp/cus-start.el'
--- a/lisp/cus-start.el 2011-10-07 02:17:29 +0000
+++ b/lisp/cus-start.el 2011-11-16 10:10:40 +0000
@@ -401,7 +401,7 @@
                       (const :tag "Only on ttys" :value tty)
                       (other :tag "Always" t)) "23.1")
             (window-splits windows boolean "24.1")
-            (window-nest windows boolean "24.1")
+            (window-combination-limit windows boolean "24.1")
             ;; xdisp.c
             (show-trailing-whitespace whitespace-faces boolean nil
                                       :safe booleanp)

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2011-11-14 20:23:26 +0000
+++ b/lisp/window.el    2011-11-16 10:10:40 +0000
@@ -3083,9 +3083,9 @@
         (parent (window-parent window))
         (function (window-parameter window 'split-window))
         (window-side (window-parameter window 'window-side))
-        ;; Rebind `window-nest' since in some cases we may have to
-        ;; override its value.
-        (window-nest window-nest)
+        ;; Rebind `window-combination-limit' since in some cases we may
+        ;; have to override its value.
+        (window-combination-limit window-combination-limit)
         atom-root)
 
     (window--check frame)
@@ -3109,15 +3109,15 @@
                 (or (not parent)
                     (not (window-parameter parent 'window-side))))
        ;; WINDOW is a side root window.  To make sure that a new parent
-       ;; window gets created set `window-nest' to t.
-       (setq window-nest t))
+       ;; 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-nest' to t to make sure that subsequent window
-       ;; deletions are handled correctly.
-       (setq window-nest t))
+       ;; bind `window-combination-limit' to t to make sure that
+       ;; subsequent window deletions are handled correctly.
+       (setq window-combination-limit t))
 
       (let* ((parent-size
              ;; `parent-size' is the size of WINDOW's parent, provided
@@ -3126,7 +3126,7 @@
             ;; `resize' non-nil means we are supposed to resize other
             ;; windows in WINDOW's combination.
             (resize
-             (and window-splits (not window-nest)
+             (and window-splits (not window-combination-limit)
                   ;; Resize makes sense in iso-combinations only.
                   (window-combined-p window horizontal)))
             ;; `old-size' is the current size of WINDOW.
@@ -3206,7 +3206,8 @@
              ;; Make new-parent non-nil if we need a new parent window;
              ;; either because we want to nest or because WINDOW is not
              ;; iso-combined.
-             (or window-nest (not (window-combined-p window horizontal))))
+             (or window-combination-limit
+                 (not (window-combined-p window horizontal))))
        (setq new-normal
              ;; Make new-normal the normal size of the new window.
              (cond
@@ -3584,7 +3585,7 @@
             (total-width . ,(window-total-size window t))
             (normal-height . ,(window-normal-size window))
             (normal-width . ,(window-normal-size window t))
-            (nest . ,(window-nest window))
+            (combination-limit . ,(window-combination-limit window))
             ,@(let (list)
                 (dolist (parameter (window-parameters window))
                   (unless (memq (car parameter)
@@ -3709,9 +3710,11 @@
                                     window-safe-min-width)))
 
              (if (window-sizable-p window (- size) horizontal 'safe)
-                 (let* ((window-nest (assq 'nest item)))
-                   ;; We must inherit the nesting, otherwise we might mess
-                   ;; up handling of atomic and side window.
+                 (let* ((window-combination-limit
+                         (assq 'combination-limit item)))
+                   ;; We must inherit the combiantion limit, otherwise
+                   ;; we might mess up handling of atomic and side
+                   ;; window.
                    (setq new (split-window window size horizontal)))
                ;; Give up if we can't resize window down to safe sizes.
                (error "Cannot resize window %s" window))
@@ -3735,10 +3738,11 @@
   (dolist (item window-state-put-list)
     (let ((window (car item))
          (splits (cdr (assq 'splits item)))
-         (nest (cdr (assq 'nest item)))
+         (combination-limit (cdr (assq 'combination-limit item)))
          (parameters (cdr (assq 'parameters 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.
       (when parameters
        (dolist (parameter parameters)

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-11-15 17:37:37 +0000
+++ b/src/ChangeLog     2011-11-16 10:10:40 +0000
@@ -1,3 +1,14 @@
+2011-11-16  Martin Rudalics  <address@hidden>
+
+       * 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  <address@hidden>
 
        * image.c (imagemagick_load_image): Fix typo.

=== modified file 'src/window.c'
--- a/src/window.c      2011-11-14 20:23:26 +0000
+++ b/src/window.c      2011-11-16 10:10:40 +0000
@@ -465,32 +465,33 @@
   return decode_any_window (window)->prev;
 }
 
-DEFUN ("window-nest", Fwindow_nest, Swindow_nest, 0, 1, 0,
-       doc: /* Return nest status of window WINDOW.
+DEFUN ("window-combination-limit", Fwindow_combination_limit, 
Swindow_combination_limit, 0, 1, 0,
+       doc: /* Return combination limit of window 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
-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.  */)
   (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,
-       doc: /* Set nest status of window WINDOW to STATUS; return STATUS.
+DEFUN ("set-window-combination-limit", Fset_window_combination_limit, 
Sset_window_combination_limit, 2, 2, 0,
+       doc: /* Set combination limit of window WINDOW to STATUS; return STATUS.
 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
-siblings.  STATUS non-nil means that child windows of WINDOW are never
-\(re-)combined with WINDOW's siblings.  */)
+If STATUS is nil, child windows of WINDOW can be recombined with
+WINDOW's siblings.  STATUS t means that child windows of WINDOW are
+never \(re-)combined with WINDOW's siblings.  Other values are reserved
+for future use.  */)
   (Lisp_Object window, Lisp_Object status)
 {
   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,
@@ -1879,7 +1880,7 @@
 
   w = XWINDOW (window);
   parent = w->parent;
-  if (!NILP (parent) && NILP (w->nest))
+  if (!NILP (parent) && NILP (w->combination_limit))
     {
       p = XWINDOW (parent);
       if (((!NILP (p->vchild) && !NILP (w->vchild))
@@ -3248,7 +3249,7 @@
   p->start = Qnil;
   p->pointm = Qnil;
   p->buffer = Qnil;
-  p->nest = Qnil;
+  p->combination_limit = Qnil;
   p->window_parameters = Qnil;
 }
 
@@ -3295,7 +3296,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->nest = w->window_parameters = Qnil;
+  w->combination_limit = w->window_parameters = Qnil;
   w->prev_buffers = w->next_buffers = Qnil;
   /* Initialize non-Lisp data.  */
   w->desired_matrix = w->current_matrix = 0;
@@ -3668,7 +3669,7 @@
   int horflag
     /* HORFLAG is 1 when we split side-by-side, 0 otherwise.  */
     = EQ (side, Qt) || EQ (side, Qleft) || EQ (side, Qright);
-  int do_nest = 0;
+  int combination_limit = 0;
 
   CHECK_WINDOW (old);
   o = XWINDOW (old);
@@ -3677,11 +3678,11 @@
 
   CHECK_NUMBER (total_size);
 
-  /* Set do_nest to 1 if we have to make a new parent window.  We do
-     that if either `window-nest' is non-nil, or OLD has no parent, or
-     OLD is ortho-combined.  */
-  do_nest =
-    !NILP (Vwindow_nest)
+  /* Set combination_limit to 1 if we have to make a new parent window.
+     We do that if either `window-combination-limit' is t, or OLD has no
+     parent, or OLD is ortho-combined.  */
+  combination_limit =
+    !NILP (Vwindow_combination_limit)
     || NILP (o->parent)
     || NILP (horflag
             ? (XWINDOW (o->parent)->hchild)
@@ -3701,7 +3702,7 @@
     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 (!do_nest && !NILP (Vwindow_splits))
+  else if (!combination_limit && !NILP (Vwindow_splits))
     /* `window-splits' non-nil means try to resize OLD's siblings
        proportionally.  */
     {
@@ -3726,7 +3727,7 @@
     }
 
   /* 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
         by make_parent_window and we need it below for assigning it to
@@ -3735,8 +3736,9 @@
 
       make_parent_window (old, horflag);
       p = XWINDOW (o->parent);
-      /* Store value of `window-nest' in new parent's nest slot.  */
-      p->nest = Vwindow_nest;
+      /* Store value of `window-combination-limit' in new parent's
+        combination_limit slot.  */
+      p->combination_limit = Vwindow_combination_limit;
       /* These get applied below.  */
       p->new_total = horflag ? o->total_cols : o->total_lines;
       p->new_normal = new_normal;
@@ -3923,7 +3925,7 @@
          /* Put SIBLING into PARENT's place.  */
          replace_window (parent, sibling, 0);
          /* 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_lines = p->normal_lines;
          /* Mark PARENT as deleted.  */
@@ -5312,7 +5314,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 nest, window_parameters;
+  Lisp_Object combination_limit, window_parameters;
 };
 
 #define SAVED_WINDOW_N(swv,n) \
@@ -5543,7 +5545,7 @@
          w->scroll_bar_width = p->scroll_bar_width;
          w->vertical_scroll_bar_type = p->vertical_scroll_bar_type;
          w->dedicated = p->dedicated;
-         w->nest = p->nest;
+         w->combination_limit = p->combination_limit;
          w->window_parameters = p->window_parameters;
          XSETFASTINT (w->last_modified, 0);
          XSETFASTINT (w->last_overlay_modified, 0);
@@ -5821,7 +5823,7 @@
       p->scroll_bar_width = w->scroll_bar_width;
       p->vertical_scroll_bar_type = w->vertical_scroll_bar_type;
       p->dedicated = w->dedicated;
-      p->nest = w->nest;
+      p->combination_limit = w->combination_limit;
       p->window_parameters = w->window_parameters;
       if (!NILP (w->buffer))
        {
@@ -6284,7 +6286,8 @@
    and the like.
 
    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
 compare_window_configurations (Lisp_Object configuration1, Lisp_Object 
configuration2, int ignore_positions)
@@ -6496,24 +6499,27 @@
 same combination.  This also allows to split a window that is otherwise
 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;
 
-  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.
 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
 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
-parent window.  If all splits behave this way, each frame's window tree
-is a binary tree and every window but the frame's root window has
-exactly one sibling.
-
-The value of this variable is also assigned to the nest status of the
-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'.  */);
-  Vwindow_nest = Qnil;
+If this variable is t, splitting a window always creates a new parent
+window.  If all splits behave this way, each frame's window tree is a
+binary tree and every window but the frame's root window has exactly one
+sibling.
+
+Other values are reserved for future use.
+
+The value of this variable is also assigned to the combination_limit
+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 (&Sminibuffer_window);
@@ -6533,8 +6539,8 @@
   defsubr (&Swindow_left_child);
   defsubr (&Swindow_next_sibling);
   defsubr (&Swindow_prev_sibling);
-  defsubr (&Swindow_nest);
-  defsubr (&Sset_window_nest);
+  defsubr (&Swindow_combination_limit);
+  defsubr (&Sset_window_combination_limit);
   defsubr (&Swindow_use_time);
   defsubr (&Swindow_top_line);
   defsubr (&Swindow_left_column);

=== modified file 'src/window.h'
--- a/src/window.h      2011-11-12 09:55:50 +0000
+++ b/src/window.h      2011-11-16 10:10:40 +0000
@@ -258,9 +258,8 @@
        must run the redisplay-end-trigger-hook.  */
     Lisp_Object redisplay_end_trigger;
 
-    /* Non-nil means this window's child windows are never
-       (re-)combined.  */
-    Lisp_Object nest;
+    /* t means this window's child windows are not (re-)combined.  */
+    Lisp_Object combination_limit;
 
     /* Alist of <buffer, window-start, window-point> triples listing
        buffers previously shown in this window.  */


reply via email to

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