emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106289: * lisp/window.el (window-val


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106289: * lisp/window.el (window-valid-p): Rename from window-any-p.
Date: Sat, 05 Nov 2011 11:20:45 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106289
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2011-11-05 11:20:45 +0800
message:
  * lisp/window.el (window-valid-p): Rename from window-any-p.
  (window-normalize-any-window, window-size-ignore)
  (window-state-get): Callers changed.
modified:
  etc/NEWS
  lisp/ChangeLog
  lisp/window.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2011-11-04 22:16:46 +0000
+++ b/etc/NEWS  2011-11-05 03:20:45 +0000
@@ -1033,33 +1033,31 @@
 of the line.
 
 ** Window changes
-
 +++
 *** Window tree functions are accessible in Elisp.
 Functions are provided to return the parent, siblings or child windows
 of any window including internal windows (windows not associated with a
 buffer) in the window tree.
 
+**** New function `window-valid-p' gives non-nil for live and internal
+windows.
 +++
-*** Window manipulation can deal with internal windows.
+**** Window manipulation can deal with internal windows.
 Many window handling functions like `split-window', `delete-window', or
 `delete-other-windows' as well as the window resizing functions can now
 act on any window including internal ones.
-
 +++
 *** window-total-height/-width vs window-body-height/-width.
 The function `window-height' has been renamed to `window-total-height'
 and `window-width' has been renamed to `window-body-width'.  The old
 names are provided as aliases.  Two new functions `window-total-width'
 and `window-body-height' are provided.
-
 +++
 *** Window parameters specific to window handling functions.
 For each window you can specify a parameter to override the default
 behavior of a number of functions like `split-window', `delete-window'
 and `delete-other-windows'.  The variable `ignore-window-parameters'
 allows to ignore processing such parameters.
-
 +++
 *** New semantics of third argument of `split-window'.
 The third argument of `split-window' has been renamed to SIDE and can be
@@ -1067,17 +1065,14 @@
 new window appear on the corresponding side of the window that shall be
 split.  Any other value of SIDE will cause `split-window' to split the
 window into two side-by-side windows as before.
-
 +++
 *** Window resizing functions.
 A new standard function for resizing windows called `window-resize' has
 been introduced.  This and all other functions for resizing windows no
 longer delete any windows when they become too small.
-
 +++
 *** Deleting the selected window now selects the most recently selected
 live window on that frame instead.
-
 +++
 *** `adjust-window-trailing-edge' adjustments.
 `adjust-window-trailing-edge' can now deal with fixed-size windows and
@@ -1085,7 +1080,6 @@
 edge cannot be shrunk any more.  This makes its behavior more similar to
 that of Emacs 21 without compromising, however, its inability to delete
 windows which was introduced in Emacs 22.
-
 +++
 *** Window-local buffer lists.
 Windows now have local buffer lists.  This means that removing a buffer
@@ -1093,17 +1087,16 @@
 shown in that window with its previous window-start and window-point
 positions.  This also means that the same buffer may be automatically
 shown twice even if it already appears in another window.
-
 +++
 *** `switch-to-buffer' has a new optional argument FORCE-SAME-WINDOW,
 which if non-nil requires the buffer to be displayed in the currently
 selected window, signaling an error otherwise.  If nil, another window
 can be used, e.g. if the selected one is strongly dedicated.
-
++++
 *** `split-window-vertically' and `split-window-horizontally' renamed
 to `split-window-below' and `split-window-right' respectively.
 The old names are kept as aliases.
-
++++
 *** Display actions
 
 **** The second arg to `display-buffer' and `pop-to-buffer' is now

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-11-04 22:07:12 +0000
+++ b/lisp/ChangeLog    2011-11-05 03:20:45 +0000
@@ -1,3 +1,9 @@
+2011-11-05  Chong Yidong  <address@hidden>
+
+       * window.el (window-valid-p): Rename from window-any-p.
+       (window-normalize-any-window, window-size-ignore)
+       (window-state-get): Callers changed.
+
 2011-11-04  Eli Zaretskii  <address@hidden>
 
        * mail/rmail.el (rmail-simplified-subject): Decode subject with

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2011-11-04 10:09:41 +0000
+++ b/lisp/window.el    2011-11-05 03:20:45 +0000
@@ -100,8 +100,10 @@
       (setq window (window-next-sibling window))))
   window)
 
-(defsubst window-any-p (object)
-  "Return t if OBJECT denotes a live or internal window."
+(defsubst window-valid-p (object)
+  "Return t if OBJECT denotes a live window or internal window.
+Otherwise, return nil; this includes the case where OBJECT is a
+deleted window."
   (and (windowp object)
        (or (window-buffer object) (window-child object))
        t))
@@ -135,7 +137,7 @@
 WINDOW must be a window that has not been deleted and defaults to
 the selected window."
   (if window
-      (if (window-any-p window)
+      (if (window-valid-p window)
          window
        (error "%s is not a window" window))
     (selected-window)))
@@ -532,7 +534,7 @@
 
 (defsubst window-size-ignore (window ignore)
   "Return non-nil if IGNORE says to ignore size restrictions for WINDOW."
-  (if (window-any-p ignore) (eq window ignore) ignore))
+  (if (window-valid-p ignore) (eq window ignore) ignore))
 
 (defun window-min-size (&optional window horizontal ignore)
   "Return the minimum number of lines of WINDOW.
@@ -3677,7 +3679,7 @@
 value can be also stored on disk and read back in a new session."
   (setq window
        (if window
-           (if (window-any-p window)
+           (if (window-valid-p window)
                window
              (error "%s is not a live or internal window" window))
          (frame-root-window)))


reply via email to

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