Commit 24300f5f authored by Chong Yidong's avatar Chong Yidong
Browse files

* lisp/window.el (window-valid-p): Rename from window-any-p.

(window-normalize-any-window, window-size-ignore)
(window-state-get): Callers changed.
parent 9f77899d
......@@ -1033,33 +1033,31 @@ directionality are not known in advance, without disrupting the layout
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
*** 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 @@ set to any of the values 'below, 'right, 'above, or 'left to make the
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 @@ is able to resize other windows if a window adjacent to the trailing
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 @@ from display in a window will preferably show the buffer previously
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
2011-11-05 Chong Yidong <>
* 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 <>
* mail/rmail.el (rmail-simplified-subject): Decode subject with
......@@ -100,8 +100,10 @@ be any window."
(setq window (window-next-sibling 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))
......@@ -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)
(error "%s is not a window" 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)
(error "%s is not a live or internal window" window))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment