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