I want to load flyspell-mode
and execute flyspell-buffer
automatically after emacs loaded a tex file. I tried the following which loads flyspell-mode
but doesn't seem to execute flyspell-buffer
. What would be the proper way to to this? How do I have to change it if I want it on every file not just on LaTeX-files?
(setq ispell-program-name "hunspell")
(setq ispell-local-dictionary "de_DE")
(setq ispell-local-dictionary-alist
'(("de_DE" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil nil nil utf-8)
("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil nil nil utf-8)
))
(add-hook 'LaTeX-mode-hook 'turn-on-flyspell)
(add-hook 'LaTeX-mode-hook 'flyspell-buffer)