26 October 2022

hunspell

System: Slackware Linux (version 15.0)
CPUs: Intel(R) Core(TM) i5-3230M CPU @2.60GHz
Deps: da_DK-2.7.066.oxt, hunspell-en_GB-ise-2020.12.07.zip

Setup emacs for Danish and English dictionaries.

bash-5.1$ cd /tmp
bash-5.1$ git clone -q https://github.com/slackbuilds/hunspell-da-2.7.066.git
bash-5.1$ git clone -q https://github.com/slackbuilds/hunspell-en-2020.12.07.git
bash-5.1$

As root build and run installpkg on the generated *.tgz files.

bash-5.1$ emacs --version | sed 1q
GNU Emacs 27.2
bash-5.1$ echo $LANG
da_DK.utf8
bash-5.1$

Add this content to your emacs initialisation file.

bash-5.1$ cat ~/.emacs.d/init.el
(with-eval-after-load "ispell"
  (setenv "LANG" "en_DK.utf8")
  (setq ispell-program-name "hunspell")
  (setq ispell-dictionary "da_DK,en_DK")
  (ispell-set-spellchecker-params)
  (ispell-set-spellchecker-params)
  (ispell-hunspell-add-multi-dic "da_DK,en_DK"))
bash-5.1$