6

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?

Yotam
  • 10,295
  • 30
  • 88
  • 128
  • Please accept answers to your many questions. Below you say "Thanks" but haven't up-voted or accepted an answer. – Geoff Mar 21 '13 at 16:29

2 Answers2

5

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.

hpekristiansen
  • 1,030
  • 3
  • 17
  • 35
  • This solved the problem for me too; it seems that `'latex-mode-hook` works for some and '`LaTeX-mode-hook` for others. I was mistakenly using `'latex-mode-hook` with `'turn-on-flyspell` – oLas May 15 '14 at 08:49
4

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

(add-hook 'latex-mode-hook 'flyspell-mode)
ataylor
  • 64,891
  • 24
  • 161
  • 189