summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/window.el12
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ab409e10003..39d64bcc7c0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2011-11-05 Chong Yidong <cyd@gnu.org>
+
+ * 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 <eliz@gnu.org>
* mail/rmail.el (rmail-simplified-subject): Decode subject with
diff --git a/lisp/window.el b/lisp/window.el
index d6ab5e0e6cc..e75833fcd57 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -100,8 +100,10 @@ be any window."
(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 @@ FRAME must be a live frame and defaults to the selected frame."
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 @@ window).")
(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 @@ to put the state recorded here into an arbitrary window. The
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)))