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


Mode Line Format

Each Emacs window (aside from minibuffer windows) includes a mode line, which displays status information about the buffer displayed in the window. The mode line contains information about the buffer, such as its name, associated file, depth of recursive editing, and the major and minor modes.

This section describes how the contents of the mode line are controlled. We include it in this chapter because much of the information displayed in the mode line relates to the enabled major and minor modes.

mode-line-format is a buffer-local variable that holds a template used to display the mode line of the current buffer. All windows for the same buffer use the same mode-line-format and their mode lines appear the same (except for scrolling percentages, and line and column numbers).

The mode line of a window is normally updated whenever a different buffer is shown in the window, or when the buffer's modified-status changes from nil to t or vice-versa. If you modify any of the variables referenced by mode-line-format (see section Variables Used in the Mode Line), or any other variables and data structures that affect how text is displayed (see section Emacs Display), you may want to force an update of the mode line so as to display the new information or display it in the new way.

Function: force-mode-line-update
Force redisplay of the current buffer's mode line.

The mode line is usually displayed in inverse video; see mode-line-inverse-video in section Inverse Video.


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