1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-29 19:48:19 +00:00

Improve error message when Hunspell dictionaries are misconfigured

* lisp/textmodes/ispell.el
(ispell-find-hunspell-dictionaries): Produce a meaningful
error message if Hunspell dictionaries are misconfigured.
(Bug#32319)
This commit is contained in:
Eli Zaretskii 2018-08-11 10:34:10 +03:00
parent 110a7d1a6e
commit 3f8324e0de

View File

@ -1173,6 +1173,12 @@ dictionary from that list was found."
;; Parse and set values for default dictionary.
(setq hunspell-default-dict (or hunspell-multi-dict
(car hunspell-default-dict)))
;; If hunspell-default-dict is nil, ispell-parse-hunspell-affix-file
;; will barf with an error message that doesn't help users figure
;; out what is wrong. Produce an error message that points to the
;; root cause of the problem.
(or hunspell-default-dict
(error "Can't find Hunspell dictionary with a .aff affix file"))
(setq hunspell-default-dict-entry
(ispell-parse-hunspell-affix-file hunspell-default-dict))
;; Create an alist of found dicts with only names, except for default dict.