(lispref.info)Mode Line Variables
Next: %-Constructs Prev: Mode Line Data Up: Mode Line Format
Variables Used in the Mode Line
This section describes variables incorporated by the standard value
of `mode-line-format' into the text of the mode line. There is nothing
inherently special about these variables; any other variables could
have the same effects on the mode line if `mode-line-format' were
changed to use them.
- Variable: mode-line-modified
This variable holds the value of the mode-line construct that
displays whether the current buffer is modified.
The default value of `mode-line-modified' is `("--%1*%1*-")'.
This means that the mode line displays `--**-' if the buffer is
modified, `-----' if the buffer is not modified, and `--%%-' if
the buffer is read only.
Changing this variable does not force an update of the mode line.
- Variable: mode-line-buffer-identification
This variable identifies the buffer being displayed in the window.
Its default value is `Emacs: %17b', which means that it displays
`Emacs:' followed by the buffer name. You may want to change this
in modes such as Rmail that do not behave like a "normal" Emacs.
- Variable: global-mode-string
This variable holds a string that is displayed in the mode line.
The command `display-time' puts the time and load in this variable.
The `%M' construct substitutes the value of `global-mode-string',
but this is obsolete, since the variable is included directly in
the mode line.
- Variable: mode-name
This buffer-local variable holds the "pretty" name of the current
buffer's major mode. Each major mode should set this variable so
that the mode name will appear in the mode line.
- Variable: minor-mode-alist
This variable holds an association list whose elements specify how
the mode line should indicate that a minor mode is active. Each
element of the `minor-mode-alist' should be a two-element list:
The string MODE-LINE-STRING is included in the mode line when the
value of MINOR-MODE-VARIABLE is non-`nil' and not otherwise.
These strings should begin with spaces so that they don't run
together. Conventionally, the MINOR-MODE-VARIABLE for a specific
mode is set to a non-`nil' value when that minor mode is activated.
The default value of `minor-mode-alist' is:
=> ((abbrev-mode " Abbrev")
(overwrite-mode " Ovwrt")
(auto-fill-function " Fill")
(defining-kbd-macro " Def"))
(In earlier Emacs versions, `auto-fill-function' was called
`minor-mode-alist' is not buffer-local. The variables mentioned
in the alist should be buffer-local if the minor mode can be
enabled separately in each buffer.
- Variable: mode-line-process
This buffer-local variable contains the mode line information on
process status in modes used for communicating with subprocesses.
It is displayed immediately following the major mode name, with no
intervening space. For example, its value in the `*shell*' buffer
is `(": %s")', which allows the shell to display its status along
with the major mode as: `(Shell: run)'. Normally this variable is
- Variable: default-mode-line-format
This variable holds the default `mode-line-format' for buffers
that do not override it. This is the same as `(default-value
The default value of `default-mode-line-format' is:
(-3 . "%p")
automatically generated by info2www