[Tex/LaTex] How to make AUCTeX use the spelling dictionary in the same language as babel is loaded with

auctexbabelemacsspelling

Is it possible to setup AUCTeX so that it loads the spelling dictionary in the same language as the language used by babel? For example, is it possible to load the Danish ispell dictionary when a document includes \usepackage[danish]{babel}?

Best Answer

This can be done by using language specific hooks in AUCTeX. To automatically load the Danish ispell dictionary when a document includes \usepackage[danish]{babel} put the following in your .emacs:

(add-hook 'TeX-language-dk-hook
      (lambda () (ispell-change-dictionary "danish")))
Related Question