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.
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, `--%%-' if
the buffer is read only, and `--%*--' if the buffer is read only
and modified.
Changing this variable does not force an update of the mode line.
("%F: %17b")
, which means that it usually
displays `Emacs:' followed by seventeen characters of the buffer
name. (In a terminal frame, it displays the frame name instead of
`Emacs'; this has the effect of showing the frame number.) You may
want to change this in modes such as Rmail that do not behave like a
"normal" Emacs.
display-time
sets global-mode-string
to refer to the variable
display-time-string
, which holds a string containing the time and
load information.
The `%M' construct substitutes the value of
global-mode-string
, but this is obsolete, since the variable is
included directly in the mode line.
minor-mode-alist
should be a two-element list:
(minor-mode-variable mode-line-string)
More generally, mode-line-string can be any mode line spec. It
appears 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:
minor-mode-alist => ((vc-mode vc-mode) (abbrev-mode " Abbrev") (overwrite-mode overwrite-mode) (auto-fill-function " Fill") (defining-kbd-macro " Def") (isearch-mode isearch-mode))
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.
(": %s")
, which allows the shell to display its status along
with the major mode as: `(Shell: run)'. Normally this variable
is nil
.
mode-line-format
for buffers
that do not override it. This is the same as (default-value
'mode-line-format)
.
The default value of default-mode-line-format
is:
("" mode-line-modified mode-line-buffer-identification " " global-mode-string " %[(" mode-name mode-line-process minor-mode-alist "%n" ")%]----" (line-number-mode "L%l--") (-3 . "%p") "-%-")
vc-mode
, local in each buffer, records whether the
buffer's visited file is maintained with version control, and, if so,
which kind. Its value is nil
for no version control, or a string
that appears in the mode line.
Go to the first, previous, next, last section, table of contents.