Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flyspell doesn't load with LaTeX file in emacs

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?

like image 378
Yotam Avatar asked Nov 30 '11 19:11

Yotam


2 Answers

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.

like image 185
hpekristiansen Avatar answered Oct 09 '22 21:10

hpekristiansen


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

(add-hook 'latex-mode-hook 'flyspell-mode)
like image 21
ataylor Avatar answered Oct 09 '22 22:10

ataylor