From: Eli Zaretskii Date: Sat, 11 Aug 2018 07:34:10 +0000 (+0300) Subject: Improve error message when Hunspell dictionaries are misconfigured X-Git-Tag: emacs-27.0.90~4612 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3f8324e0de182945a809f63766cf9611aa45610c;p=emacs.git 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) --- diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index e6f436fa1a1..87bcb5d651a 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -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.