Emacs. Проверка правописания. ispell
Проверка правописания в Emacs. Ispell.
Содержание
1 Общая информация
2 Бекэнд
2.1 aspell
2.2 hunspell
- Проверка установленных словарей:
1hunspell -D
- Сконфигурируем словари:
1with-eval-after-load "ispell" 2 ;; Configure `LANG`, otherwise ispell.el cannot find a 'default 3 ;; dictionary' even though multiple dictionaries will be configured 4 ;; in next line. 5 (setenv "LANG" "ru_RU.UTF-8") 6 (setq ispell-program-name "hunspell") 7 ;; Configure English + Russian. 8 (setq ispell-dictionary "en_US,ru_RU") 9 ;; ispell-set-spellchecker-params has to be called 10 ;; before ispell-hunspell-add-multi-dic will work 11 (ispell-set-spellchecker-params) 12 (ispell-hunspell-add-multi-dic "en_US,ru_RU") 13 ;; For saving words to the personal dictionary, don't infer it from 14 ;; the locale, otherwise it would save to ~/.hunspell_de_DE. 15 (setq ispell-personal-dictionary "~/.local/hunspell_personal")) 16 17;; The personal dictionary file has to exist, otherwise hunspell will 18;; silently not use it. 19(unless (file-exists-p ispell-personal-dictionary) 20 (write-region "" nil ispell-personal-dictionary nil 0))