flyspell doesn't load with LaTeX file in emacs

风格不统一 提交于 2019-12-23 09:33:52

问题


Following this web page, I have edited my ~/.emacs file and added the line:

(add-hook 'LaTeX-mode-hook 'flyspell-mode)

However, flyspell doesn't start with LaTeX files. Why is that so?


回答1:


Emacs is case-sensitive; the hook should be written as latex-mode-hook. Try this:

(add-hook 'latex-mode-hook 'flyspell-mode)



回答2:


I could not make this work:

(add-hook 'LaTeX-mode-hook 'flyspell-mode)   or
(add-hook 'latex-mode-hook 'flyspell-mode)

But then I found this:

(add-hook 'LaTeX-mode-hook 'turn-on-flyspell)

-and it is working.



来源:https://stackoverflow.com/questions/8332163/flyspell-doesnt-load-with-latex-file-in-emacs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!