本文介绍了Emacs Elisp覆盖默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个缩写定义,除了乳胶模式,我可以访问到任何地方。我定义

 (setq-default abbrev-mode t)
(add-hook'latex-mode-hook lambda()(abbrev-mode -1)))

但是每当我打开一个胶乳文件已启用缩写模式。发生了什么?

解决方案

原因是AUCTex使用LaTeX-mode-hook。感谢stefan在评论中指出


I have several abbrev defined that I was accessible everywhere except in latex mode. I defined

(setq-default abbrev-mode t)
(add-hook 'latex-mode-hook (lambda () (abbrev-mode -1)))

But whenever I open a latex file it still has abbrev mode enabled. What's going on?

解决方案

The reason was that AUCTex uses LaTeX-mode-hook. Thanks to stefan in the comment for pointing that out

这篇关于Emacs Elisp覆盖默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 02:38