14

I'm using flyspell mode, but unfortunatly I have to M-x flyspell-mode in each AUCTeX buffer.

Somehow (add-hook 'LaTeX-mode-hook 'flyspell-mode) doesn't work for me.

What is the correct flyspell-hook in AUCTeX?

10

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

This will force flyspell-mode to turn on, instead of toggling it.

  • thanks. That worked. removing the hook worked as well. The hook might have been sourced somehow otherwise (from text-mode?). – Dima Jul 30 '10 at 14:55
  • This does not work the way you think it works. You probably enabled the flyspell-mode before in your text-mode-hook. The above code does not work and so does not disable the flyspell-mode. – ppareit Dec 10 '18 at 9:08
  • This does not work. I am getting the same error as in stackoverflow.com/questions/42335854/…. The answer below does work for me. – Boris Bukh Jan 29 at 15:05
8
(add-hook 'LaTeX-mode-hook '(flyspell-mode t))

I would be surprised if the above worked.

The following works (using emacs 24):

(add-hook 'LaTeX-mode-hook #'turn-on-flyspell)
  • This worked for me. The above didn't. – NWMT Sep 21 '18 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.