nschum / auto-dictionary-mode

Emacs: automatic dictionary switcher for flyspell
http://nschum.de/src/emacs/auto-dictionary/
28 stars 13 forks source link

Allow overriding automatic dictionary selection with file-local variable #5

Open nschum opened 11 years ago

nschum commented 11 years ago

auto-dictionary-mode should respect dictionaries set via file-local variables, i.e. ispell-local-dictionary.

StreakyCobra commented 8 years ago

Seconded. This is particularly annoying when someone chose a dictionary with adict-change-dictionary, disable the spell-checking, and reactivate it. The manually defined dictionary is overwritten by a guessed one.

As we have this problem in Spacemacs, we use this workaround in the meantime:

      (add-hook 'auto-dictionary-mode-hook
                (lambda ()
                  (when (and
                         (fboundp 'adict-change-dictionary)
                         ispell-local-dictionary)
                    (adict-change-dictionary ispell-local-dictionary))) 'append)
nschum commented 8 years ago

PRs welcome :)