emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106348: Rename and clean up function


From: martin rudalics
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106348: Rename and clean up functions in window.el.
Date: Fri, 11 Nov 2011 10:59:00 +0100
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106348
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Fri 2011-11-11 10:59:00 +0100
message:
  Rename and clean up functions in window.el.
  
  * window.el (windows-with-parameter): Remove unused function.
  (windows-at-side): Rename to window-at-side-list.
  (window-check, window-atom-check, window-atom-check-1)
  (window-side-check): Prefix with "window--".
modified:
  lisp/ChangeLog
  lisp/window.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-11-11 01:46:03 +0000
+++ b/lisp/ChangeLog    2011-11-11 09:59:00 +0000
@@ -1,3 +1,10 @@
+2011-11-11  Martin Rudalics  <address@hidden>
+
+       * window.el (windows-with-parameter): Remove unused function.
+       (windows-at-side): Rename to window-at-side-list.
+       (window-check, window-atom-check, window-atom-check-1)
+       (window-side-check): Prefix with "window--".
+
 2011-11-11  Glenn Morris  <address@hidden>
 
        * subr.el (eval-after-load): If FILE is already loaded,

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2011-11-09 09:36:05 +0000
+++ b/lisp/window.el    2011-11-11 09:59:00 +0000
@@ -292,28 +292,6 @@
   (setq window (window-normalize-window window))
   (walk-window-tree-1 proc window any t))
 
-(defun windows-with-parameter (parameter &optional value frame any values)
-  "Return a list of all windows on FRAME with PARAMETER non-nil.
-FRAME defaults to the selected frame.  Optional argument VALUE
-non-nil means only return windows whose window-parameter value of
-PARAMETER equals VALUE \(comparison is done using `equal').
-Optional argument ANY non-nil means consider internal windows
-too.  Optional argument VALUES non-nil means return a list of cons
-cells whose car is the value of the parameter and whose cdr is
-the window."
-  (let (this-value windows)
-    (walk-window-tree
-     (lambda (window)
-       (when (and (setq this-value (window-parameter window parameter))
-                 (or (not value) (or (equal value this-value))))
-          (setq windows
-                (if values
-                    (cons (cons this-value window) windows)
-                  (cons window windows)))))
-     frame any)
-
-    (nreverse windows)))
-
 (defun window-with-parameter (parameter &optional value frame any)
   "Return first window on FRAME with PARAMETER non-nil.
 FRAME defaults to the selected frame.  Optional argument VALUE
@@ -353,8 +331,8 @@
      window t)
     window))
 
-(defun window-atom-check-1 (window)
-  "Subroutine of `window-atom-check'."
+(defun window--atom-check-1 (window)
+  "Subroutine of `window--atom-check'."
   (when window
     (if (window-parameter window 'window-atom)
        (let ((count 0))
@@ -375,18 +353,18 @@
             window t)))
       ;; Check children.
       (unless (window-buffer window)
-       (window-atom-check-1 (window-left-child window))
-       (window-atom-check-1 (window-top-child window))))
+       (window--atom-check-1 (window-left-child window))
+       (window--atom-check-1 (window-top-child window))))
     ;; Check right sibling
-    (window-atom-check-1 (window-right window))))
+    (window--atom-check-1 (window-right window))))
 
-(defun window-atom-check (&optional frame)
+(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 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)))
+  (window--atom-check-1 (frame-root-window frame)))
 
 ;; Side windows.
 (defvar window-sides '(left top right bottom)
@@ -441,7 +419,7 @@
      (integer :tag "Number" :value 3 :size 5)))
   :group 'windows)
 
-(defun window-side-check (&optional frame)
+(defun window--side-check (&optional frame)
   "Check the window-side parameter of all windows on FRAME.
 FRAME defaults to the selected frame.  If the configuration is
 invalid, reset all window-side parameters to nil.
@@ -512,11 +490,11 @@
         (set-window-parameter window 'window-side nil))
        frame t))))
 
-(defun window-check (&optional frame)
+(defun window--check (&optional frame)
   "Check atomic and side windows on FRAME.
 FRAME defaults to the selected frame."
-  (window-side-check frame)
-  (window-atom-check frame))
+  (window--side-check frame)
+  (window--atom-check frame))
 
 ;;; Window sizes.
 (defvar window-size-fixed nil
@@ -1106,7 +1084,7 @@
     (= (nth edge (window-edges window))
        (nth edge (window-edges (frame-root-window window))))))
 
-(defun windows-at-side (&optional frame side)
+(defun window-at-side-list (&optional frame side)
   "Return list of all windows on SIDE of FRAME.
 FRAME must be a live frame and defaults to the selected frame.
 SIDE can be any of the symbols `left', `top', `right' or
@@ -2379,7 +2357,7 @@
         (function (window-parameter window 'delete-window))
         (parent (window-parent window))
         atom-root)
-    (window-check frame)
+    (window--check frame)
     (catch 'done
       ;; Handle window parameters.
       (cond
@@ -2433,7 +2411,7 @@
          ;; not be selected, fix this here.
          (other-window -1 frame))
        (run-window-configuration-change-hook frame)
-       (window-check frame)
+       (window--check frame)
        ;; Always return nil.
        nil))))
 
@@ -2460,7 +2438,7 @@
         (function (window-parameter window 'delete-other-windows))
         (window-side (window-parameter window 'window-side))
         atom-root side-main)
-    (window-check frame)
+    (window--check frame)
     (catch 'done
       (cond
        ;; Ignore window parameters if `ignore-window-parameters' is t or
@@ -2484,7 +2462,7 @@
       (unless (eq window side-main)
        (delete-other-windows-internal window side-main)
        (run-window-configuration-change-hook frame)
-       (window-check frame))
+       (window--check frame))
       ;; Always return nil.
       nil)))
 
@@ -3111,7 +3089,7 @@
         (window-nest window-nest)
         atom-root)
 
-    (window-check frame)
+    (window--check frame)
     (catch 'done
       (cond
        ;; Ignore window parameters if either `ignore-window-parameters'
@@ -3265,7 +3243,7 @@
            (set-window-parameter new 'window-side window-side))
 
          (run-window-configuration-change-hook frame)
-         (window-check frame)
+         (window--check frame)
          ;; Always return the new window.
          new)))))
 
@@ -3885,7 +3863,7 @@
        (set-window-buffer window (current-buffer))
        (window-state-put-1 state window nil totals)
        (window-state-put-2 ignore))
-      (window-check frame))))
+      (window--check frame))))
 
 (defun display-buffer-record-window (type window buffer)
   "Record information for window used by `display-buffer'.


reply via email to

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