The fields of a window (for a complete list, see the definition of
struct window in window.h) include:
The frame that this window is on.
nil if this window is a minibuffer window.
Internally, Emacs arranges windows in a tree; each group of siblings has a parent window whose area includes all the siblings. This field points to a window’s parent.
Parent windows do not display buffers, and play little role in display except to shape their child windows. Emacs Lisp programs usually have no access to the parent windows; they operate on the windows at the leaves of the tree, which actually display buffers.
These fields contain the window’s leftmost child and its topmost child
hchild is used if the window is subdivided
horizontally by child windows, and
vchild if it is subdivided
vertically. In a live window, only one of
buffer (q.v.) is non-
The next sibling and previous sibling of this window.
nil if the window is the right-most or bottom-most in its group;
nil if it is the left-most or top-most in its
The left-hand edge of the window, measured in columns, relative to the leftmost column in the frame (column 0).
The top edge of the window, measured in lines, relative to the topmost line in the frame (line 0).
The width and height of the window, measured in columns and lines respectively. The width includes the scroll bar and fringes, and/or the separator line on the right of the window (if any).
The buffer that the window is displaying.
A marker pointing to the position in the buffer that is the first character displayed in the window.
This is the value of point in the current buffer when this window is selected; when it is not selected, it retains its previous value.
If this flag is non-
nil, it says that the window has been
scrolled explicitly by the Lisp program. This affects what the next
redisplay does if point is off the screen: instead of scrolling the
window to show the text around point, it moves point to a location that
is on the screen.
This field is set temporarily to 1 to indicate to redisplay that
start of this window should not be changed, even if point
nil means current value of
start was the beginning of a line
when it was chosen.
This is the last time that the window was selected. The function
get-lru-window uses this field.
A unique number assigned to this window when it was created.
modiff field of the window’s buffer, as of the last time
a redisplay completed in this window.
overlay_modiff field of the window’s buffer, as of the last
time a redisplay completed in this window.
The buffer’s value of point, as of the last time a redisplay completed in this window.
nil value means the window’s buffer was modified when the
window was last updated.
This window’s vertical scroll bar.
The widths of the left and right margins in this window. A value of
nil means no margin.
The widths of the left and right fringes in this window. A value of
t means use the values of the frame.
nil value means the fringes outside the display margins;
othersize they are between the margin and the text.
This is computed as
z minus the buffer position of the last glyph
in the current matrix of the window. The value is only valid if
window_end_valid is not
The byte position corresponding to
The window-relative vertical position of the line containing
This field is set to a non-
nil value if
window_end_pos is truly
valid. This is
nil if nontrivial redisplay is pre-empted, since in that
case the display that
window_end_pos was computed for did not get
onto the screen.
A structure describing where the cursor is in this window.
The value of
cursor as of the last redisplay that finished.
A structure describing where the cursor of this window physically is.
The type, height, and width of the cursor that was last displayed on this window.
This field is non-zero if the cursor is physically on.
Non-zero means the cursor in this window is logically off. This is used for blinking the cursor.
This field contains the value of
cursor_off_p as of the time of
the last redisplay.
This is set to 1 during redisplay when this window must be updated.
This is the number of columns that the display in the window is scrolled horizontally to the left. Normally, this is 0.
Vertical scroll amount, in pixels. Normally, this is 0.
nil if this window is dedicated to its buffer.
The window’s display table, or
nil if none is specified for it.
nil means this window’s mode line needs to be updated.
The line number of a certain position in the buffer, or
This is used for displaying the line number of point in the mode line.
The position in the buffer for which the line number is known, or
nil meaning none is known. If it is a buffer, don’t display
the line number as long as the window shows that buffer.
The column number currently displayed in this window’s mode line, or
if column numbers are not being displayed.
Glyph matrices describing the current and desired display of this window.