Search code examples
emacselispemacs23

Emacs 23.3 - default-mode-line-format obsolete?


I switched from emacs 23.1 to emacs 23.3. I had in my configuration file a setting like the following:

(setq default-mode-line-format '(
    string-one
    string-two
    more-strings
))

Emacs responds that default-mode-line-format became obsolete since emacs 23.2, and says to use mode-line-format instead, but simply replacing default-mode-line-format with mode-line-format does not seem to work. How can I fix it to work with emacs 23.3?


Solution

  • If you read the documentation for mode-line-format, you'll notice it says:

    Automatically becomes buffer-local when set in any fashion.
    

    And what that means is that in order for you to change the value for all buffers, you need to use setq-default like so:

    (setq-default mode-line-format 
          '(string-one
            string-two
            more-strings))
    

    Documentation links: buffer-local variables, describe-variable (bound to C-h v).