ModeLineConfiguration

The Emacs ModeLine is configurable, offering special modes and functions that change its functionality.

Display of some standard information in the mode line is governed by these minor modes (each toggle on and off):

Here are particular enhancements to the mode line:

Customize the mode line by altering the ‘mode-line-format’ variable. The ‘header-line-format’ variable customizes the HeaderLine.

The mode line is buffer-specific, meaning that the same buffer has the same mode line in different windows.

The mode line may be hidden for a specific buffer by changing ‘mode-line-format’ to ‘nil’.

The mode line normally looks something like this:

    -u:**-F1  *scratch*   All L12    (Lisp Interaction)-------%-

which may be cryptic to new users, so to make it like this:

    Lisp Interaction: buffer *scratch*, line 5 -- user: alice

use:

    (setq mode-line-format
          (list
           ;; value of `mode-name'
           "%m: "
           ;; value of current buffer name
           "buffer %b, "
           ;; value of current line number
           "line %l "
           "-- user: "
           ;; value of user
           (getenv "USER")))

The mode line uses the same data structure as the FrameTitle and HeaderLine:

See also [2] in the Emacs Lisp Reference Manual


CategoryDisplay CategoryEditing CategoryWindows CategoryModeLine