Skip to content

Don't touch mode-line-format

Ghost User requested to merge lunaryorn:no-mode-line-format into master

Use mode-line-buffer-identification instead. That's the variable we are supposed to use for this purpose, as by its docstring (emphasis mine):

Mode line construct for identifying the buffer being displayed. Its default value is ("%12b") with some text properties added. Major modes that edit things other than ordinary files may change this (e.g. Info, Dired,...)

Using this variable instead of changing the whole mode-line-format preserves any user customizations in the mode line (such as a custom position indicator, etc.), keeps the standard functionality of the mode line (e.g. using the mouse on the buffer name, etc.) and also uses less vertical space.

The following screenshots show the difference. Note that my mode line is customized, so it'll look a bit different on your Emacs. The part about git-timemachine itself will stay the same, though.

Before

bildschirmfoto 2014-08-18 um 17 23 43

After

bildschirmfoto 2014-08-18 um 17 23 25

Merge request reports