GNU Info

Info Node: (elisp)Mode Line Format

(elisp)Mode Line Format


Next: Imenu Prev: Minor Modes Up: Modes
Enter node , (file) or (file)node

Mode Line Format
================

   Each Emacs window (aside from minibuffer windows) typically has a
mode line at the bottom, 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 major and minor modes.  A window can also have a "header
line", which is much like the mode line but appears at the top of the
window (starting in Emacs 21).

   This section describes how to control the contents of the mode line
and header line.  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', so their mode lines
appear the same--except for scrolling percentages, and line and column
numbers, since those depend on point and on how the window is scrolled.
`header-line-format' is used likewise for header lines.

   The mode line and header line of a window are 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' (Note: Mode Line
Variables), or any other variables and data structures that affect
how text is displayed (Note: 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 and header line.

   The mode line is usually displayed in inverse video; see
`mode-line-inverse-video' in Note: Inverse Video.

Mode Line Data
The data structure that controls the mode line.
Mode Line Variables
Variables used in that data structure.
%-Constructs
Putting information into a mode line.
Properties in Mode
Using text properties in the mode line.
Header Lines
Like a mode line, but at the top.

automatically generated by info2www version 1.2.2.9