【问题标题】:Emacs 23.3 - default-mode-line-format obsolete?Emacs 23.3 - 默认模式行格式已过时?
【发布时间】:2011-07-21 10:39:09
【问题描述】:

我从 emacs 23.1 切换到 emacs 23.3。我的配置文件中有如下设置:

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

Emacs 回应称 default-mode-line-format 自 emacs 23.2 起已过时,并表示改用 mode-line-format,但简单地将 default-mode-line-format 替换为 mode-line-format 似乎不起作用。如何修复它以与 emacs 23.3 一起使用?

【问题讨论】:

    标签: emacs elisp emacs23


    【解决方案1】:

    如果您阅读mode-line-format 的文档,您会注意到它说:

    Automatically becomes buffer-local when set in any fashion.
    

    这意味着为了让您更改所有缓冲区的值,您需要像这样使用setq-default

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

    文档链接:buffer-local variablesdescribe-variable(绑定到 C-h v)。

    【讨论】:

      猜你喜欢
      • 2015-01-06
      • 2011-05-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-24
      • 1970-01-01
      相关资源
      最近更新 更多