如何隐藏Emacs的“过时变量”警告? [英] How do I hide Emacs' "obsolete variable" warnings?
本文介绍了如何隐藏Emacs的“过时变量”警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经升级到Emacs 23.3,现在的 * Compile-Log *
缓冲区不断打开,错误如下:
I've upgraded to Emacs 23.3 and now the *Compile-Log*
buffer opens constantly with errors like:
Warning: `font-lock-beginning-of-syntax-function' is an obsolete variable (as
of Emacs 23.3); use `syntax-begin-function' instead.
我假设上游作者将来会处理这些警告。在此之前,我如何防止这些错误出现并打开一个新窗口?
I'm assuming the upstream authors will take care of these warnings in the future. Until then, how can I prevent these errors from appearing and opening a new window?
推荐答案
我现在回到23.2到另一个问题,但是当我在尝试23.3时,我已经为这个问题提供了一个解决方法。它只是防止变量被认为是过时的,但是直到Mumamo排序出来,这似乎更为可取。
I'm currently back on 23.2 due to another issue, but I hacked a workaround for this issue while I was trying 23.3. It simply prevents the variable from being considered obsolete, but until Mumamo sorts itself out, that seemed preferable!
;; Mumamo is making emacs 23.3 freak out:
(when (and (equal emacs-major-version 23)
(equal emacs-minor-version 3))
(eval-after-load "bytecomp"
'(add-to-list 'byte-compile-not-obsolete-vars
'font-lock-beginning-of-syntax-function))
;; tramp-compat.el clobbers this variable!
(eval-after-load "tramp-compat"
'(add-to-list 'byte-compile-not-obsolete-vars
'font-lock-beginning-of-syntax-function)))
这篇关于如何隐藏Emacs的“过时变量”警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文