emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106312: Remove term "subwindow" from


From: martin rudalics
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106312: Remove term "subwindow" from code and documentation.
Date: Mon, 07 Nov 2011 10:51:08 +0100
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106312
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Mon 2011-11-07 10:51:08 +0100
message:
  Remove term "subwindow" from code and documentation.
  
  * window.h: Declare delete_all_child_windows instead of
  delete_all_subwindows.
  * window.c (Fwindow_nest, Fset_window_nest)
  (Fset_window_new_total, Fset_window_new_normal)
  (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
  (delete_all_subwindows): Rename to delete_all_child_windows.
  (Fdelete_other_windows_internal, Fset_window_configuration):
  Call delete_all_child_windows instead of delete_all_subwindows.
  * frame.c (delete_frame): Call delete_all_child_windows instead
  of delete_all_subwindows.
  
  * window.el (window-combinations): Make WINDOW argument
  mandatory.  Rewrite doc-string.
  (walk-window-subtree, window-atom-check, window-min-delta)
  (window-max-delta, window--resize-this-window)
  (window--resize-root-window-vertically, window-tree)
  (balance-windows, window-state-put): Rewrite doc-strings as to
  not mention the term "subwindow".
  (window--resize-subwindows-skip-p): Rename to
  window--resize-child-windows-skip-p.
  (window--resize-subwindows-normal): Rename to
  window--resize-child-windows-normal.
  (window--resize-subwindows): Rename to
  window--resize-child-windows.
  (window-or-subwindow-p): Rename to window--in-subtree-p.
  
  * windows.texi (Resizing Windows, Splitting Windows)
  (Window Configurations): Use "child window" instead of
  "subwindow".
modified:
  doc/lispref/ChangeLog
  doc/lispref/windows.texi
  lisp/ChangeLog
  lisp/window.el
  src/ChangeLog
  src/frame.c
  src/window.c
  src/window.h
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2011-11-06 06:14:01 +0000
+++ b/doc/lispref/ChangeLog     2011-11-07 09:51:08 +0000
@@ -1,3 +1,9 @@
+2011-11-07  Martin Rudalics  <address@hidden>
+
+       * windows.texi (Resizing Windows, Splitting Windows)
+       (Window Configurations): Use "child window" instead of
+       "subwindow".
+
 2011-11-06  Chong Yidong  <address@hidden>
 
        * windows.texi (Basic Windows): Clarify various definitions.

=== modified file 'doc/lispref/windows.texi'
--- a/doc/lispref/windows.texi  2011-11-06 06:14:01 +0000
+++ b/doc/lispref/windows.texi  2011-11-07 09:51:08 +0000
@@ -719,7 +719,7 @@
 window tree but try to steal or distribute the space needed for the
 resize operation among the other windows within @var{window}'s
 combination.  Optional argument @var{nodown} address@hidden means don't
-check whether @var{window} itself and its subwindows can be resized.
+check whether @var{window} itself and its child windows can be resized.
 @end defun
 
 The function @code{window-resizable} does not change any window sizes.
@@ -1352,15 +1352,15 @@
 
 @cindex nest status
 The @dfn{nest status} of a window specifies whether that window may be
-removed and its subwindows recombined with that window's siblings when
-such a sibling's subwindow is deleted.  The nest status is initially
-assigned by @code{split-window} from the current value of the variable
address@hidden (see above) and can be reset by the function
+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
 @code{set-window-nest} (see below).
 
-If the return value is @code{nil}, subwindows 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
-return value of @code{nil} means that subwindows of @var{window} are
+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.
 @end defun
 
@@ -3740,7 +3740,7 @@
 
 The optional argument @var{ignore} address@hidden means to ignore
 minimum window sizes and fixed size restrictions.  If @var{ignore}
-equals @code{safe}, this means subwindows can get as small as one line
+equals @code{safe}, this means windows can get as small as one line
 and/or two columns.
 @end defun
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-11-07 02:52:29 +0000
+++ b/lisp/ChangeLog    2011-11-07 09:51:08 +0000
@@ -1,3 +1,20 @@
+2011-11-07  Martin Rudalics  <address@hidden>
+
+       * window.el (window-combinations): Make WINDOW argument
+       mandatory.  Rewrite doc-string.
+       (walk-window-subtree, window-atom-check, window-min-delta)
+       (window-max-delta, window--resize-this-window)
+       (window--resize-root-window-vertically, window-tree)
+       (balance-windows, window-state-put): Rewrite doc-strings as to
+       not mention the term "subwindow".
+       (window--resize-subwindows-skip-p): Rename to
+       window--resize-child-windows-skip-p.
+       (window--resize-subwindows-normal): Rename to
+       window--resize-child-windows-normal.
+       (window--resize-subwindows): Rename to
+       window--resize-child-windows.
+       (window-or-subwindow-p): Rename to window--in-subtree-p.
+
 2011-11-07  Mark Lillibridge  <address@hidden>  (tiny change)
 
        * mail/rmail.el (rmail-get-new-mail, rmail-insert-inbox-text):

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2011-11-06 03:59:53 +0000
+++ b/lisp/window.el    2011-11-07 09:51:08 +0000
@@ -211,11 +211,11 @@
             (window-left-child parent)
           (window-top-child parent)))))
 
-(defun window-combinations (&optional window horizontal)
-  "Return largest number of vertically arranged subwindows of WINDOW.
+(defun window-combinations (window &optional horizontal)
+  "Return largest number of windows vertically arranged within WINDOW.
 If WINDOW is omitted or nil, it defaults to the selected window.
 If HORIZONTAL is non-nil, return the largest number of
-horizontally arranged subwindows of WINDOW."
+windows horizontally arranged within WINDOW."
   (setq window (window-normalize-window window))
   (cond
    ((window-live-p window)
@@ -225,7 +225,7 @@
        (window-left-child window)
       (window-top-child window))
     ;; If WINDOW is iso-combined, return the sum of the values for all
-    ;; subwindows of WINDOW.
+    ;; child windows of WINDOW.
     (let ((child (window-child window))
          (count 0))
       (while child
@@ -236,7 +236,7 @@
       count))
    (t
     ;; If WINDOW is not iso-combined, return the maximum value of any
-    ;; subwindow of WINDOW.
+    ;; child window of WINDOW.
     (let ((child (window-child window))
          (count 1))
       (while child
@@ -279,14 +279,16 @@
      proc (frame-root-window walk-window-tree-frame) any)))
 
 (defun walk-window-subtree (proc &optional window any)
-  "Run function PROC on each live subwindow of WINDOW.
+  "Run function PROC on the subtree of windows rooted at WINDOW.
 WINDOW defaults to the selected window.  PROC must be a function
-with one argument - a window.  ANY, if non-nil means to run PROC
-on all live and internal subwindows of WINDOW.
+with one argument - a window.  By default, run PROC only on live
+windows of the subtree.  If the optional argument ANY is non-nil,
+run PROC on all live and internal windows of the subtree.  If
+WINDOW is live, run PROC on WINDOW only.
 
 This function performs a pre-order, depth-first traversal of the
-window tree rooted at WINDOW.  If PROC changes that window tree,
-the result is unpredictable."
+subtree rooted at WINDOW.  If PROC changes that tree, the result
+is unpredictable."
   (setq window (window-normalize-window window))
   (walk-window-tree-1 proc window any t))
 
@@ -381,9 +383,9 @@
 (defun window-atom-check (&optional frame)
   "Check atomicity of all windows on FRAME.
 FRAME defaults to the selected frame.  If an atomic window is
-wrongly configured, reset the atomicity of all its subwindows to
-nil.  An atomic window is wrongly configured if it has no
-subwindows or one of its subwindows is not atomic."
+wrongly configured, reset the atomicity of all its windows on
+FRAME to nil.  An atomic window is wrongly configured if it has
+no child windows or one of its child windows is not atomic."
   (window-atom-check-1 (frame-root-window frame)))
 
 ;; Side windows.
@@ -555,13 +557,13 @@
          ;; WINDOW is an internal window.
          (if (window-combined-p sub horizontal)
              ;; The minimum size of an iso-combination is the sum of
-             ;; the minimum sizes of its subwindows.
+             ;; the minimum sizes of its child windows.
              (while sub
                (setq value (+ value
                               (window-min-size-1 sub horizontal ignore)))
                (setq sub (window-right sub)))
            ;; The minimum size of an ortho-combination is the maximum of
-           ;; the minimum sizes of its subwindows.
+           ;; the minimum sizes of its child windows.
            (while sub
              (setq value (max value
                               (window-min-size-1 sub horizontal ignore)))
@@ -619,8 +621,9 @@
 columns can be added to WINDOW.  A return value of zero means
 that no lines (or columns) can be added to WINDOW.
 
-This function looks only at WINDOW and its subwindows.  The
-function `window-resizable' looks at other windows as well.
+This function looks only at WINDOW and, recursively, its child
+windows.  The function `window-resizable' looks at other windows
+as well.
 
 DELTA positive means WINDOW shall be enlarged by DELTA lines or
 columns.  If WINDOW cannot be enlarged by DELTA lines or columns
@@ -668,24 +671,24 @@
       (if sub
          ;; WINDOW is an internal window.
          (if (window-combined-p sub horizontal)
-             ;; An iso-combination is fixed size if all its subwindows
-             ;; are fixed-size.
+             ;; An iso-combination is fixed size if all its child
+             ;; windows are fixed-size.
              (progn
                (while sub
                  (unless (window-size-fixed-1 sub horizontal)
-                   ;; We found a non-fixed-size subwindow, so WINDOW's
-                   ;; size is not fixed.
+                   ;; We found a non-fixed-size child window, so
+                   ;; WINDOW's size is not fixed.
                    (throw 'fixed nil))
                  (setq sub (window-right sub)))
-               ;; All subwindows are fixed-size, so WINDOW's size is
+               ;; All child windows are fixed-size, so WINDOW's size is
                ;; fixed.
                (throw 'fixed t))
            ;; An ortho-combination is fixed-size if at least one of its
-           ;; subwindows is fixed-size.
+           ;; child windows is fixed-size.
            (while sub
              (when (window-size-fixed-1 sub horizontal)
-               ;; We found a fixed-size subwindow, so WINDOW's size is
-               ;; fixed.
+               ;; We found a fixed-size child window, so WINDOW's size
+               ;; is fixed.
                (throw 'fixed t))
              (setq sub (window-right sub))))
        ;; WINDOW is a live window.
@@ -717,8 +720,8 @@
       (catch 'done
        (if (window-combined-p sub horizontal)
            ;; In an iso-combination throw DELTA if we find at least one
-           ;; subwindow and that subwindow is either not of fixed-size
-           ;; or we can ignore fixed-sizeness.
+           ;; child window and that window is either not fixed-size or
+           ;; we can ignore fixed-sizeness.
            (let ((skip (eq trail 'after)))
              (while sub
                (cond
@@ -728,11 +731,11 @@
                 ((and (not (window-size-ignore window ignore))
                       (window-size-fixed-p sub horizontal)))
                 (t
-                 ;; We found a non-fixed-size subwindow.
+                 ;; We found a non-fixed-size child window.
                  (throw 'done delta)))
                (setq sub (window-right sub))))
          ;; In an ortho-combination set DELTA to the minimum value by
-         ;; which other subwindows can shrink.
+         ;; which other child windows can shrink.
          (while sub
            (unless (eq sub window)
              (setq delta
@@ -768,8 +771,8 @@
 tree but try to enlarge windows within WINDOW's combination only.
 
 Optional argument NODOWN non-nil means don't check whether WINDOW
-itself \(and its subwindows) can be shrunk; check only whether at
-least one other windows can be enlarged appropriately."
+itself \(and its child windows) can be shrunk; check only whether
+at least one other windows can be enlarged appropriately."
   (setq window (window-normalize-window window))
   (let ((size (window-total-size window horizontal))
        (minimum (window-min-size window horizontal ignore)))
@@ -797,7 +800,7 @@
       (catch 'fixed
        (if (window-combined-p sub horizontal)
            ;; For an iso-combination calculate how much we can get from
-           ;; other subwindows.
+           ;; other child windows.
            (let ((skip (eq trail 'after)))
              (while sub
                (cond
@@ -811,7 +814,7 @@
                              (window-min-size sub horizontal ignore))))))
                (setq sub (window-right sub))))
          ;; For an ortho-combination throw DELTA when at least one
-         ;; subwindow is fixed-size.
+         ;; child window is fixed-size.
          (while sub
            (when (and (not (eq sub window))
                       (not (window-size-ignore sub ignore))
@@ -850,8 +853,8 @@
 WINDOW's combination.
 
 Optional argument NODOWN non-nil means do not check whether
-WINDOW itself \(and its subwindows) can be enlarged; check only
-whether other windows can be shrunk appropriately."
+WINDOW itself \(and its child windows) can be enlarged; check
+only whether other windows can be shrunk appropriately."
   (setq window (window-normalize-window window))
   (if (and (not (window-size-ignore window ignore))
           (not nodown) (window-size-fixed-p window horizontal))
@@ -895,7 +898,7 @@
 within WINDOW's combination.
 
 Optional argument NODOWN non-nil means don't check whether WINDOW
-and its subwindows can be resized."
+and its child windows can be resized."
   (setq window (window-normalize-window window))
   (cond
    ((< delta 0)
@@ -1463,9 +1466,9 @@
 
       ;; Resize now.
       (window--resize-reset frame)
-      ;; Ideally we should be able to resize just the last subwindow of
-      ;; root here.  See the comment in `resize-root-window-vertically'
-      ;; for why we do not do that.
+      ;; Ideally we should be able to resize just the last child of root
+      ;; here.  See the comment in `resize-root-window-vertically' for
+      ;; why we do not do that.
       (window--resize-this-window root (- delta) nil nil t)
       (set-window-new-total window (+ height delta))
       ;; The following routine catches the case where we want to resize
@@ -1532,14 +1535,14 @@
      (t
       (error "Cannot resize window %s" window)))))
 
-(defsubst window--resize-subwindows-skip-p (window)
+(defsubst window--resize-child-windows-skip-p (window)
   "Return non-nil if WINDOW shall be skipped by resizing routines."
   (memq (window-new-normal window) '(ignore stuck skip)))
 
-(defun window--resize-subwindows-normal (parent horizontal window this-delta 
&optional trail other-delta)
-  "Set the new normal height of subwindows of window PARENT.
+(defun window--resize-child-windows-normal (parent horizontal window 
this-delta &optional trail other-delta)
+  "Recursively set new normal height of child windows of window PARENT.
 HORIZONTAL non-nil means set the new normal width of these
-windows.  WINDOW specifies a subwindow of PARENT that has been
+windows.  WINDOW specifies a child window of PARENT that has been
 resized by THIS-DELTA lines \(columns).
 
 Optional argument TRAIL either 'before or 'after means set values
@@ -1561,8 +1564,8 @@
         (parent-normal 0.0)
         (skip (eq trail 'after)))
 
-    ;; Set parent-normal to the sum of the normal sizes of all
-    ;; subwindows of PARENT that shall be resized, excluding only WINDOW
+    ;; Set parent-normal to the sum of the normal sizes of all child
+    ;; windows of PARENT that shall be resized, excluding only WINDOW
     ;; and any windows specified by the optional TRAIL argument.
     (while sub
       (cond
@@ -1574,7 +1577,7 @@
              (+ parent-normal (window-normal-size sub horizontal)))))
       (setq sub (window-right sub)))
 
-    ;; Set the new normal size of all subwindows of PARENT from what
+    ;; Set the new normal size of all child windows of PARENT from what
     ;; they should have contributed for recovering THIS-DELTA lines
     ;; (columns).
     (setq sub (window-child parent))
@@ -1633,11 +1636,11 @@
        ;; Don't get larger than 1 or smaller than 0.
        (min 1.0 (max (- 1.0 sum) 0.0))))))
 
-(defun window--resize-subwindows (parent delta &optional horizontal window 
ignore trail edge)
-  "Resize subwindows of window PARENT vertically by DELTA lines.
+(defun window--resize-child-windows (parent delta &optional horizontal window 
ignore trail edge)
+  "Resize child windows of window PARENT vertically by DELTA lines.
 PARENT must be a vertically combined internal window.
 
-Optional argument HORIZONTAL non-nil means resize subwindows of
+Optional argument HORIZONTAL non-nil means resize child windows of
 PARENT horizontally by DELTA columns.  In this case PARENT must
 be a horizontally combined internal window.
 
@@ -1669,10 +1672,10 @@
               (setq sub first)
               (while (and (window-right sub)
                           (or (and (eq trail 'before)
-                                   (not (window--resize-subwindows-skip-p
+                                   (not (window--resize-child-windows-skip-p
                                          (window-right sub))))
                               (and (eq trail 'after)
-                                   (window--resize-subwindows-skip-p sub))))
+                                   (window--resize-child-windows-skip-p sub))))
                 (setq sub (window-right sub)))
               sub)
             (if horizontal
@@ -1700,7 +1703,7 @@
                 window (- (window-normal-size window horizontal)
                           (- (window-new-normal sub)
                              (window-normal-size sub horizontal)))))
-           (window--resize-subwindows-normal
+           (window--resize-child-windows-normal
             parent horizontal sub 0 trail delta))
          ;; Return 'normalized to notify `window--resize-siblings' that
          ;; normal sizes have been already set.
@@ -1709,9 +1712,9 @@
       (setq sub first)
       (while sub
        (cond
-        ((or (window--resize-subwindows-skip-p sub)
-             ;; Ignore windows to skip and fixed-size subwindows - in
-             ;; the latter case make it a window to skip.
+        ((or (window--resize-child-windows-skip-p sub)
+             ;; Ignore windows to skip and fixed-size child windows -
+             ;; in the latter case make it a window to skip.
              (and (not ignore)
                   (window-size-fixed-p sub horizontal)
                   (set-window-new-normal sub 'ignore))))
@@ -1799,7 +1802,7 @@
            (set-window-new-normal sub))
 
          (unless (eq (window-new-normal sub) 'ignore)
-           ;; Resize this subwindow's subwindows (back-engineering
+           ;; Resize this window's child windows (back-engineering
            ;; delta from sub's old and new total sizes).
            (let ((delta (- (window-new-total sub)
                            (window-total-size sub horizontal))))
@@ -1882,19 +1885,19 @@
            (if (zerop this-delta)
                ;; We haven't got anything from WINDOW's siblings but we
                ;; must update the normal sizes to respect other-delta.
-               (window--resize-subwindows-normal
+               (window--resize-child-windows-normal
                 parent horizontal window this-delta trail other-delta)
              ;; We did get something from WINDOW's siblings which means
-             ;; we have to resize their subwindows.
-             (unless (eq (window--resize-subwindows
+             ;; we have to resize their child windows.
+             (unless (eq (window--resize-child-windows
                           parent (- this-delta) horizontal
                           window ignore trail edge)
-                         ;; If `window--resize-subwindows' returns
+                         ;; If `window--resize-child-windows' returns
                          ;; 'normalized, this means it has set the
                          ;; normal sizes already.
                          'normalized)
                ;; Set the normal sizes.
-               (window--resize-subwindows-normal
+               (window--resize-child-windows-normal
                 parent horizontal window this-delta trail other-delta))
              ;; Set DELTA to what we still have to get from ancestor
              ;; windows.
@@ -1934,7 +1937,7 @@
 `after', resize only windows on the right or below EDGE.  Also,
 preferably only resize windows adjacent to EDGE.
 
-This function recursively resizes WINDOW's subwindows to fit the
+This function recursively resizes WINDOW's child windows to fit the
 new size.  Make sure that WINDOW is `window-resizable' before
 calling this function.  Note that this function does not resize
 siblings of WINDOW or WINDOW's parent window.  You have to
@@ -1948,11 +1951,11 @@
     (cond
      ((not sub))
      ((window-combined-p sub horizontal)
-      ;; In an iso-combination resize subwindows according to their
+      ;; In an iso-combination resize child windows according to their
       ;; normal sizes.
-      (window--resize-subwindows
+      (window--resize-child-windows
        window delta horizontal nil ignore trail edge))
-     ;; In an ortho-combination resize each subwindow by DELTA.
+     ;; In an ortho-combination resize each child window by DELTA.
      (t
       (while sub
        (window--resize-this-window
@@ -1978,7 +1981,7 @@
   "Resize root window WINDOW vertically by DELTA lines.
 If DELTA is less than zero and we can't shrink WINDOW by DELTA
 lines, shrink it as much as possible.  If DELTA is greater than
-zero, this function can resize fixed-size subwindows in order to
+zero, this function can resize fixed-size windows in order to
 recover the necessary lines.
 
 Return the number of lines that were recovered.
@@ -2214,9 +2217,9 @@
 If the root window is not split, ROOT is the root window itself.
 Otherwise, ROOT is a list (DIR EDGES W1 W2 ...) where DIR is nil
 for a horizontal split, and t for a vertical split.  EDGES gives
-the combined size and position of the subwindows in the split,
-and the rest of the elements are the subwindows in the split.
-Each of the subwindows may again be a window or a list
+the combined size and position of the child windows in the split,
+and the rest of the elements are the child windows in the split.
+Each of the child windows may again be a window or a list
 representing a window split, and so on.  EDGES is a list \(LEFT
 TOP RIGHT BOTTOM) as returned by `window-edges'."
   (setq frame (window-normalize-frame frame))
@@ -2352,13 +2355,13 @@
       ;; frame.
       t))))
 
-(defun window-or-subwindow-p (subwindow window)
-  "Return t if SUBWINDOW is either WINDOW or a subwindow of WINDOW."
-  (or (eq subwindow window)
-      (let ((parent (window-parent subwindow)))
+(defun window--in-subtree-p (window root)
+  "Return t if WINDOW is either ROOT or a member of ROOT's subtree."
+  (or (eq window root)
+      (let ((parent (window-parent window)))
        (catch 'done
          (while parent
-           (if (eq parent window)
+           (if (eq parent root)
                (throw 'done t)
              (setq parent (window-parent parent))))))))
 
@@ -2410,7 +2413,7 @@
       (let* ((horizontal (window-left-child parent))
             (size (window-total-size window horizontal))
             (frame-selected
-             (window-or-subwindow-p (frame-selected-window frame) window))
+             (window--in-subtree-p (frame-selected-window frame) window))
             ;; Emacs 23 preferably gives WINDOW's space to its left
             ;; sibling.
             (sibling (or (window-left window) (window-right window))))
@@ -3126,8 +3129,8 @@
        ;; The `split-window' parameter specifies the function to call.
        ;; If that function is `ignore', do nothing.
        (throw 'done (funcall function window size side)))
-       ;; If WINDOW is a subwindow of an atomic window, split the root
-       ;; window of that atomic window instead.
+       ;; If WINDOW is part of an atomic window, split the root window
+       ;; of that atomic window instead.
        ((and (window-parameter window 'window-atom)
             (setq atom-root (window-atom-root window))
             (not (eq atom-root window)))
@@ -3249,7 +3252,7 @@
            ;; we won't be able to return space to those windows when we
            ;; delete the one we create here.  Hence we do not go up.
            (progn
-             (window--resize-subwindows parent (- new-size) horizontal)
+             (window--resize-child-windows parent (- new-size) horizontal)
              (let* ((normal (- 1.0 new-normal))
                     (sub (window-child parent)))
                (while sub
@@ -3365,8 +3368,8 @@
 ;;; Balancing windows.
 
 ;; The following routine uses the recycled code from an old version of
-;; `window--resize-subwindows'.  It's not very pretty, but coding it the way 
the
-;; new `window--resize-subwindows' code does would hardly make it any shorter 
or
+;; `window--resize-child-windows'.  It's not very pretty, but coding it the 
way the
+;; new `window--resize-child-windows' code does would hardly make it any 
shorter or
 ;; more readable (FWIW we'd need three loops - one to calculate the
 ;; minimum sizes per window, one to enlarge or shrink windows until the
 ;; new parent-size matches, and one where we shrink the largest/enlarge
@@ -3395,14 +3398,14 @@
       (setq failed nil)
       (setq sub first)
       (while (and sub (not failed))
-       ;; Ignore subwindows that should be ignored or are stuck.
-       (unless (window--resize-subwindows-skip-p sub)
+       ;; Ignore child windows that should be ignored or are stuck.
+       (unless (window--resize-child-windows-skip-p sub)
          (setq found t)
          (setq sub-total (window-total-size sub horizontal))
          (setq sub-delta (- size sub-total))
          (setq sub-amount
                (window-sizable sub sub-delta horizontal))
-         ;; Register the new total size for this subwindow.
+         ;; Register the new total size for this child window.
          (set-window-new-total sub (+ sub-total sub-amount))
          (unless (= sub-amount sub-delta)
            (setq total-sum (- total-sum sub-total sub-amount))
@@ -3417,7 +3420,7 @@
     ;; (column) until `rest' is zero.
     (setq sub first)
     (while (and sub (> rest 0))
-      (unless (window--resize-subwindows-skip-p window)
+      (unless (window--resize-child-windows-skip-p window)
        (set-window-new-total sub 1 t)
        (setq rest (1- rest)))
       (setq sub (window-right sub)))
@@ -3439,7 +3442,7 @@
                  (window-total-size sub horizontal)
                (window-new-total sub))
              (float parent-size)))
-      ;; Recursively balance each subwindow's subwindows.
+      ;; Recursively balance each window's child windows.
       (balance-windows-1 sub horizontal)
       (setq sub (window-right sub)))))
 
@@ -3456,11 +3459,11 @@
              (setq sub (window-right sub))))))))
 
 (defun balance-windows (&optional window-or-frame)
-  "Balance the sizes of subwindows of WINDOW-OR-FRAME.
+  "Balance the sizes of windows of WINDOW-OR-FRAME.
 WINDOW-OR-FRAME is optional and defaults to the selected frame.
 If WINDOW-OR-FRAME denotes a frame, balance the sizes of all
-subwindows of that frame's root window.  If WINDOW-OR-FRAME
-denots a window, balance the sizes of all subwindows of that
+windows of that frame.  If WINDOW-OR-FRAME denots a window,
+recursively balance the sizes of all child windows of that
 window."
   (interactive)
   (let* ((window
@@ -3680,8 +3683,8 @@
              (error "%s is not a live or internal window" window))
          (frame-root-window)))
   ;; The return value is a cons whose car specifies some constraints on
-  ;; the size of WINDOW.  The cdr lists the states of the subwindows of
-  ;; WINDOW.
+  ;; the size of WINDOW.  The cdr lists the states of the child windows
+  ;; of WINDOW.
   (cons
    ;; Frame related things would go into a function, say `frame-state',
    ;; calling `window-state-get' to insert the frame's root window.
@@ -3843,7 +3846,7 @@
 
 Optional argument IGNORE non-nil means ignore minimum window
 sizes and fixed size restrictions.  IGNORE equal `safe' means
-subwindows can get as small as `window-safe-min-height' and
+windows can get as small as `window-safe-min-height' and
 `window-safe-min-width'."
   (setq window (window-normalize-window window t))
   (let* ((frame (window-frame window))

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-11-07 05:37:49 +0000
+++ b/src/ChangeLog     2011-11-07 09:51:08 +0000
@@ -1,3 +1,16 @@
+2011-11-07  Martin Rudalics  <address@hidden>
+
+       * window.h: Declare delete_all_child_windows instead of
+       delete_all_subwindows.
+       * window.c (Fwindow_nest, Fset_window_nest)
+       (Fset_window_new_total, Fset_window_new_normal)
+       (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
+       (delete_all_subwindows): Rename to delete_all_child_windows.
+       (Fdelete_other_windows_internal, Fset_window_configuration):
+       Call delete_all_child_windows instead of delete_all_subwindows.
+       * frame.c (delete_frame): Call delete_all_child_windows instead
+       of delete_all_subwindows.
+
 2011-11-07  Paul Eggert  <address@hidden>
 
        * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).

=== modified file 'src/frame.c'
--- a/src/frame.c       2011-09-13 15:33:16 +0000
+++ b/src/frame.c       2011-11-07 09:51:08 +0000
@@ -1320,7 +1320,7 @@
 
   /* Mark all the windows that used to be on FRAME as deleted, and then
      remove the reference to them.  */
-  delete_all_subwindows (f->root_window);
+  delete_all_child_windows (f->root_window);
   f->root_window = Qnil;
 
   Vframe_list = Fdelq (frame, Vframe_list);

=== modified file 'src/window.c'
--- a/src/window.c      2011-11-06 03:59:53 +0000
+++ b/src/window.c      2011-11-07 09:51:08 +0000
@@ -504,8 +504,8 @@
        doc: /* Return nest status of window WINDOW.
 If WINDOW is omitted or nil, it defaults to the selected window.
 
-If the return value is nil, subwindows of WINDOW can be recombined with
-WINDOW's siblings.  A return value of non-nil means that subwindows of
+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 are never \(re-)combined with WINDOW's siblings.  */)
   (Lisp_Object window)
 {
@@ -516,8 +516,8 @@
        doc: /* Set nest status of window WINDOW to STATUS; return STATUS.
 If WINDOW is omitted or nil, it defaults to the selected window.
 
-If STATUS is nil, subwindows of WINDOW can be recombined with WINDOW's
-siblings.  STATUS non-nil means that subwindows of WINDOW are never
+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.  */)
   (Lisp_Object window, Lisp_Object status)
 {
@@ -2571,9 +2571,9 @@
 Only the frame WINDOW is on is affected.  WINDOW may be any window and
 defaults to the selected one.
 
-Optional argument ROOT, if non-nil, must specify an internal window
-containing WINDOW as a subwindow.  If this is the case, replace ROOT by
-WINDOW and leave alone any windows not contained in ROOT.
+Optional argument ROOT, if non-nil, must specify an internal window such
+that WINDOW is in its window subtree.  If this is the case, replace ROOT
+by WINDOW and leave alone any windows not part of ROOT's subtree.
 
 When WINDOW is live try to reduce display jumps by keeping the text
 previously visible in WINDOW in the same place on the frame.  Doing this
@@ -2637,10 +2637,10 @@
     }
   else
     {
-      /* See if the frame's selected window is a subwindow of WINDOW, by
-        finding all the selected window's parents and comparing each
-        one with WINDOW.  If it isn't we need a new selected window for
-        this frame.  */
+      /* See if the frame's selected window is a part of the window
+        subtree rooted at WINDOW, by finding all the selected window's
+        parents and comparing each one with WINDOW.  If it isn't we
+        need a new selected window for this frame.  */
       swindow = FRAME_SELECTED_WINDOW (f);
       while (1)
        {
@@ -2676,7 +2676,7 @@
 
   if (NILP (w->buffer))
     {
-      /* Resize subwindows vertically.  */
+      /* Resize child windows vertically.  */
       XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines));
       w->top_line = r->top_line;
       resize_root_window (window, delta, Qnil, Qnil);
@@ -2691,7 +2691,7 @@
            resize_failed = 1;
        }
 
-      /* Resize subwindows horizontally.  */
+      /* Resize child windows horizontally.  */
       if (!resize_failed)
        {
          w->left_col = r->left_col;
@@ -2740,15 +2740,15 @@
        XWINDOW (w->parent)->hchild = sibling;
     }
 
-  /* Delete ROOT and all subwindows of ROOT.  */
+  /* Delete ROOT and all child windows of ROOT.  */
   if (!NILP (r->vchild))
     {
-      delete_all_subwindows (r->vchild);
+      delete_all_child_windows (r->vchild);
       r->vchild = Qnil;
     }
   else if (!NILP (r->hchild))
     {
-      delete_all_subwindows (r->hchild);
+      delete_all_child_windows (r->hchild);
       r->hchild = Qnil;
     }
 
@@ -3349,7 +3349,7 @@
 Optional argument ADD non-nil means add SIZE to the new total size of
 WINDOW and return the sum.
 
-Note: This function does not operate on any subwindows of WINDOW.  */)
+Note: This function does not operate on any child windows of WINDOW.  */)
      (Lisp_Object window, Lisp_Object size, Lisp_Object add)
 {
   struct window *w = decode_any_window (window);
@@ -3367,7 +3367,7 @@
        doc: /* Set new normal size of WINDOW to SIZE.
 Return SIZE.
 
-Note: This function does not operate on any subwindows of WINDOW.  */)
+Note: This function does not operate on any child windows of WINDOW.  */)
      (Lisp_Object window, Lisp_Object size)
 {
   struct window *w = decode_any_window (window);
@@ -3378,7 +3378,7 @@
 
 /* Return 1 if setting w->total_lines (w->total_cols if HORFLAG is
    non-zero) to w->new_total would result in correct heights (widths)
-   for window W and recursively all subwindows of W.
+   for window W and recursively all child windows of W.
 
    Note: This function does not check any of `window-fixed-size-p',
    `window-min-height' or `window-min-width'.  It does check that window
@@ -3393,7 +3393,7 @@
     {
       c = XWINDOW (w->vchild);
       if (horflag)
-       /* All subwindows of W must have the same width as W.  */
+       /* All child windows of W must have the same width as W.  */
        {
          while (c)
            {
@@ -3405,8 +3405,8 @@
          return 1;
        }
       else
-       /* The sum of the heights of the subwindows of W must equal W's
-          height.  */
+       /* The sum of the heights of the child windows of W must equal
+          W's height.  */
        {
          int sum_of_sizes = 0;
          while (c)
@@ -3424,7 +3424,7 @@
     {
       c = XWINDOW (w->hchild);
       if (horflag)
-       /* The sum of the widths of the subwindows of W must equal W's
+       /* The sum of the widths of the child windows of W must equal W's
           width.  */
        {
          int sum_of_sizes = 0;
@@ -3438,7 +3438,7 @@
          return (sum_of_sizes == XINT (w->new_total));
        }
       else
-       /* All subwindows of W must have the same height as W.  */
+       /* All child windows of W must have the same height as W.  */
        {
          while (c)
            {
@@ -3458,9 +3458,9 @@
 }
 
 /* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to
-   w->new_total for window W and recursively all subwindows of W.  Also
-   calculate and assign the new vertical (horizontal) start positions of
-   each of these windows.
+   w->new_total for window W and recursively all child windows of W.
+   Also calculate and assign the new vertical (horizontal) start
+   positions of each of these windows.
 
    This function does not perform any error checks.  Make sure you have
    run window_resize_check on W before applying this function.  */
@@ -3534,8 +3534,8 @@
 values.  HORIZONTAL non-nil means apply requested width values.
 
 This function checks whether the requested values sum up to a valid
-window layout, recursively assigns the new sizes of all subwindows and
-calculates and assigns the new start positions of these windows.
+window layout, recursively assigns the new sizes of all child windows
+and calculates and assigns the new start positions of these windows.
 
 Note: This function does not check any of `window-fixed-size-p',
 `window-min-height' or `window-min-width'.  All these checks have to
@@ -3931,12 +3931,12 @@
 
       if (!NILP (w->vchild))
        {
-         delete_all_subwindows (w->vchild);
+         delete_all_child_windows (w->vchild);
          w->vchild = Qnil;
        }
       else if (!NILP (w->hchild))
        {
-         delete_all_subwindows (w->hchild);
+         delete_all_child_windows (w->hchild);
          w->hchild = Qnil;
        }
       else if (!NILP (w->buffer))
@@ -5515,7 +5515,7 @@
         Save their current buffers in their height fields, since we may
         need it later, if a buffer saved in the configuration is now
         dead.  */
-      delete_all_subwindows (FRAME_ROOT_WINDOW (f));
+      delete_all_child_windows (FRAME_ROOT_WINDOW (f));
 
       for (k = 0; k < saved_windows->header.size; k++)
        {
@@ -5729,10 +5729,10 @@
 }
 
 
-/* Delete all subwindows reachable via the next, vchild, and hchild
-   slots of WINDOW.  */
+/* Recursively delete all child windows reachable via the next, vchild,
+   and hchild slots of WINDOW.  */
 void
-delete_all_subwindows (Lisp_Object window)
+delete_all_child_windows (Lisp_Object window)
 {
   register struct window *w;
 
@@ -5740,18 +5740,18 @@
 
   if (!NILP (w->next))
     /* Delete WINDOW's siblings (we traverse postorderly).  */
-    delete_all_subwindows (w->next);
+    delete_all_child_windows (w->next);
 
   w->total_lines = w->buffer;       /* See Fset_window_configuration for 
excuse.  */
 
   if (!NILP (w->vchild))
     {
-      delete_all_subwindows (w->vchild);
+      delete_all_child_windows (w->vchild);
       w->vchild = Qnil;
     }
   else if (!NILP (w->hchild))
     {
-      delete_all_subwindows (w->hchild);
+      delete_all_child_windows (w->hchild);
       w->hchild = Qnil;
     }
   else if (!NILP (w->buffer))

=== modified file 'src/window.h'
--- a/src/window.h      2011-08-29 15:43:34 +0000
+++ b/src/window.h      2011-11-07 09:51:08 +0000
@@ -824,7 +824,7 @@
                                             enum window_part *, int);
 EXFUN (Fwindow_dedicated_p, 1);
 extern void resize_frame_windows (struct frame *, int, int);
-extern void delete_all_subwindows (Lisp_Object);
+extern void delete_all_child_windows (Lisp_Object);
 extern void freeze_window_starts (struct frame *, int);
 extern void grow_mini_window (struct window *, int);
 extern void shrink_mini_window (struct window *);


reply via email to

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