Next: The Window Object, Previous: Point, Up: Consoles; Devices; Frames; Windows [Contents][Index]
If a frame contains multiple windows (panes), they are always created by splitting an existing window along the horizontal or vertical axis. Terminology is a bit confusing here: to split a window horizontally means to create two side-by-side windows, i.e. to make a vertical cut in a window. Likewise, to split a window vertically means to create two windows, one above the other, by making a horizontal cut.
If you split a window and then split again along the same axis, you will end up with a number of panes all arranged along the same axis. The precise way in which the splits were made should not be important, and this is reflected internally. Internally, all windows are arranged in a tree, consisting of two types of windows, combination windows (which have children, and are covered completely by those children) and leaf windows, which have no children and are visible. Every combination window has two or more children, all arranged along the same axis. There are (logically) two subtypes of windows, depending on whether their children are horizontally or vertically arrayed. There is always one root window, which is either a leaf window (if the frame contains only one window) or a combination window (if the frame contains more than one window). In the latter case, the root window will have two or more children, either horizontally or vertically arrayed, and each of those children will be either a leaf window or another combination window.
Here are some rules:
nil
. Remember that horizontally-arrayed
means “side-by-side” and vertically-arrayed means
one above the other.
start
(the
first buffer position displayed in the window) and pointm
(the window’s stashed value of point
—see above) fields,
while combination windows have nil
in these fields.
next
and prev
fields of each child window.
dead
bit to 1 and clear out the
next
, prev
, hchild
, and vchild
fields, for
GC purposes.
next
field of the root
points to the minibuffer, and the prev
field of the minibuffer
points to the root. The other next
and prev
fields are
nil
, and the frame points to both of these windows.
Minibuffer-less frames have no minibuffer window, and the next
and prev
of the root window are nil
. Minibuffer-only
frames have no root window, and the next
of the minibuffer window
is nil
but the prev
points to itself. (#### This is an
artifact that should be fixed.)
Next: The Window Object, Previous: Point, Up: Consoles; Devices; Frames; Windows [Contents][Index]