在Emacs中,如何摆脱;(hi lock模式)的可能古老用法;错误?

在Emacs中,如何摆脱;(hi lock模式)的可能古老用法;错误?,emacs,Emacs,我在OSX上使用GNU Emacs 24.3.1。当我启动Emacs时,出现以下错误: Warning (emacs): Possible archaic use of (hi-lock-mode). Use (global-hi-lock-mode 1) in .emacs to enable hi-lock for all buffers, use (hi-lock-mode 1) for individual buffers. For compatibility with Emacs v

我在OSX上使用GNU Emacs 24.3.1。当我启动Emacs时,出现以下错误:

Warning (emacs): Possible archaic use of (hi-lock-mode).
Use (global-hi-lock-mode 1) in .emacs to enable hi-lock for all buffers,
use (hi-lock-mode 1) for individual buffers.  For compatibility with Emacs
versions before 22 use the following in your init file:

        (if (functionp 'global-hi-lock-mode)
            (global-hi-lock-mode 1)
          (hi-lock-mode 1))
根据rgrep,我的
~/.emacs.d
文件夹中没有字符串
hi lock
。我没有回溯,因为它出现在
*警告*
中,而不是
回溯

我怎样才能找到罪魁祸首并消除这个错误

  • 递归地将init文件对分,以查找导致警告的部分。如果罪魁祸首只是加载了另一个库的代码,那么递归地将其平分,以找到源代码

    要递归地对分一个文件,我建议使用命令
    comment region
    ,我将其绑定到
    C-xc-。您可以使用它来注释或取消注释文本块等。注释出文件的1/2,然后是3/4,然后是7/8等,直到您将其完全缩小。这是一个二进制搜索,所以速度非常快

  • 当然,您也可以使用
    grep
    源代码(加载),例如,
    hi lock