Go to the first, previous, next, last section, table of contents.


Closing Windows

Unlike buffers, window objects don't have indefinite extent, even when a window is incapable of being referenced the object will not be destroyed by the garbage collector; count the user looking at the window as a reference!

When the window is closed (by the destroy-window function) the object loses its `window-ness' and the garbage collector is free to reclaim its memory.

Function: close-window &optional window
This function closes the window window (or the current window) and deletes its entry from the window-list variable.

If this window is the only one the editor has open the user is asked if it's okay to lose any modified buffers before the window is closed.

Function: close-other-windows &optional window
Uses close-window to close all windows except window (or the current window).

Function: destroy-window window
Closes the window window. After a window object has been closed it is no longer a member of the type `window'.

Before closing the window the destroy-window-hook is evaluated with the window being destroyed as an argument.

When the last window is closed the editor will exit automatically.

Like the destroy-buffer function, this function is dangerous if used carelessly.

Both close-window and close-other-windows eventually call this function.

Hook: destroy-window-hook
Hook called by destroy-window before it does anything. It has one argument -- the window to be destroyed.


Go to the first, previous, next, last section, table of contents.