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
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
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
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
(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))
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)))
(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.
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)))