I am trying to configure Hunspell in my emacs running in windows. When I type M-x ispell-buffer
, I get the following error:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("," nil 0)
split-string(nil "," t)
ispell-parse-hunspell-affix-file(nil)
ispell-find-hunspell-dictionaries()
ispell-set-spellchecker-params()
ispell-region(1 25)
ispell-buffer()
funcall-interactively(ispell-buffer)
call-interactively(ispell-buffer record nil)
command-execute(ispell-buffer record)
execute-extended-command(nil "ispell-buffer" "ispell-bu")
funcall-interactively(execute-extended-command nil "ispell-buffer" "ispell-bu")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
My .emacs
file looks like this:
(setq exec-path (append exec-path '("D:/programs/emacs/hunspell/bin/")))
(setq ispell-program-name "hunspell")
;; below two lines reset the the hunspell to it STOPS querying locale!
(setq ispell-local-dictionary "en_US")
;; "en_US" is key to lookup in `ispell-local-dictionary-alist`
(setq ispell-local-dictionary-alist
'(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']"
nil ("-d" "en_US") nil utf-8)))