This section describes variables incorporated by the
standard value of modeline-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 modeline if
modeline-format were changed to use them.
This variable holds the value of the modeline construct that displays whether the current buffer is modified.
The default value of
modeline-modifiedis("--%1*%1+-"). This means that the modeline 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 modeline.
This variable identifies the buffer being displayed in the window. Its default value is
("%F: %17b"), which means that it usually displays ‘SXEmacs:’ followed by seventeen characters of the buffer name.In a terminal frame, it displays the frame name instead of ‘SXEmacs’; 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” SXEmacs.
This variable holds a modeline spec that appears in the mode line by default, just after the buffer name. The command
display-timesetsglobal-mode-stringto refer to the variabledisplay-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 modeline.
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 modeline.
This variable holds an association list whose elements specify how the modeline should indicate that a minor mode is active. Each element of the
minor-mode-alistshould be a two-element list:(minor-mode-variable modeline-string)More generally, modeline-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-nilvalue when that minor mode is activated.The default value of
minor-mode-alistis: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-alistis not buffer-local. The variables mentioned in the alist should be buffer-local if the minor mode can be enabled separately in each buffer.
This buffer-local variable contains the modeline 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 isnil.
This variable holds the default
modeline-formatfor buffers that do not override it. This is the same as(default-value 'modeline-format).The default value of
default-modeline-formatis:("" modeline-modified modeline-buffer-identification " " global-mode-string " %[(" mode-name modeline-process minor-mode-alist "%n" ")%]----" (line-number-mode "L%l--") (-3 . "%p") "-%-")