18

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?

1
  • There is an emacs StackExchange site, shouldn't this question be there? Commented Jul 24, 2020 at 10:12

2 Answers 2

13

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

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

3
  • thanks. That worked. removing the hook worked as well. The hook might have been sourced somehow otherwise (from text-mode?).
    – Dima
    Commented Jul 30, 2010 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
    Commented Dec 10, 2018 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
    Commented Jan 29, 2019 at 15:05
10
(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)
2
  • This worked for me. The above didn't.
    – NWMT
    Commented Sep 21, 2018 at 13:20
  • indeed, this one works instead of the above. Emacs 26.3.
    – Boson Bear
    Commented Jun 28, 2020 at 10:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .