I'm using the following code to launch
flyspell when I edit LaTeX files with Emacs+AUCTeX.
(if (file-exists-p "/usr/bin/hunspell") (progn (setq ispell-program-name "hunspell") (eval-after-load "ispell" '(progn (defun ispell-get-coding-system () 'utf-8))))) (global-set-key [f2] 'flyspell-mode) (add-hook 'LaTeX-mode-hook 'flyspell-mode)
You can notice
flyspell is automatically started when in the LaTeX mode (AUCTeX mode) and could be disable/enable with the shortcut F2.
The configuration uses
hunspell (which is much better than
aspell in my opinion) with the system default language (in my case: French).
I would like to be able to change the language with a shortcut. I'm writing in French and English (sometimes inside the same document) and I would be able to switch language in an quick way during editing. For example, it would be wonderful if I could choose English dictionary with F4 and go back to the default French dictionary with F3 (when F2 is still used to toogle on/off
P-S : For now, I'm doing the switch with M-x
ispell-change-dictionary but it isn't very efficient.