Skip to content

Commit

Permalink
fixed: flyspell can use hunspell at emacs
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Bin committed Apr 28, 2022
1 parent 0065e4a commit 260b4e8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lisp/init-spelling.el
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,15 @@ Please note RUN-TOGETHER makes aspell less capable. So it should be used in `pr
;; use hunspell
((executable-find "hunspell")
(setq ispell-program-name "hunspell")
(setq ispell-local-dictionary "hunspelldict")
(setq ispell-local-dictionary my-default-spell-check-language)
(setq ispell-local-dictionary-alist
(list (list "hunspelldict" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil (list "-d" my-default-spell-check-language) nil 'utf-8)))
;; new variable `ispell-hunspell-dictionary-alist' is defined in Emacs
(list (list my-default-spell-check-language
"[[:alpha:]]" "[^[:alpha:]]" "[']"
nil
(list "-d" my-default-spell-check-language)
nil
'utf-8)))
;; New variable `ispell-hunspell-dictionary-alist' is defined in Emacs
;; If it's nil, Emacs tries to automatically set up the dictionaries.
(when (boundp 'ispell-hunspell-dictionary-alist)
(setq ispell-hunspell-dictionary-alist ispell-local-dictionary-alist)))
Expand Down

0 comments on commit 260b4e8

Please sign in to comment.