Recently, I updated my GNU emacs from v26.3 to v27.2. Now, ispell does not work anymore under Windows 10 (on my Macs, it still works). On my Windows machine, I use hunspell, which has been the same v1.7.0. I am wondering what should be changed in my setup ~/.emacs.d/init.el for the ispell in v27.2 to work. Just as an experiment, if I replace /usr/share/emacs/27.2/lisp/textmodes/ispell.[el,elc] by those of 26.3, the ispell system works under v27.2. That means that some setting in the new ispell.el has changed. My current setup in ~/.emacs.d/init.el is the following, which I copied from the posting Tutorial: spellchecking with hunspell (1.7.0) for emacs (26.2) on Windows (10) : emacs (reddit.com)

(autoload 'ispell-message "ispell"
  "Check spelling of mail message or news post.")
(setq ispell-program-name "hunspell")
(setq ispell-library-directory "C:/ProgramData/dict-en")
(setq ispell-hunspell-dict-paths-alist '(("en_US" "C:/ProgramData/dict-en/en_US.aff")))
(setq ispell-local-dictionary "en_US")
(setq ispell-local-dictionary-alist
;; Please note the list `("-d" "en_US")` contains ACTUAL parameters passed to hunspell
;; You could use `("-d" "en_US,en_US-med")` to check with multiple dictionaries
'(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_US") nil utf-8)))
;; the following line won't make flyspell-mode enabled by default as you might think
(setq ispell-personal-dictionary "C:/Users/me/.hunspell_en_US")
(flyspell-mode 1)
;; ispell-word for showing correcting options of the current misspelled word
;(global-set-key (kbd "M-\\") 'ispell-word

If I use the ispell.el of v27.2, I got the error message: ispell: Can’t find Hunspell dictionary with a .aff affix file

Thanks a lot for your help!

  • In case it's a bug in 27.2 which is fixed in 28.1, you could consider updating to that.
    – phils
    Jun 2, 2022 at 5:18

1 Answer 1


I just found a solution. If I insert the following line after setting up ispell-local-dictionary-alist in my init.el:

(setq ispell-hunspell-dictionary-alist ispell-local-dictionary-alist)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.