diff options
| author | Eli Zaretskii | 2018-08-11 10:34:10 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-08-11 10:34:10 +0300 |
| commit | 3f8324e0de182945a809f63766cf9611aa45610c (patch) | |
| tree | c1cc9db0cf22e041a27d7faaffcad45c1cc9701b /lisp | |
| parent | 110a7d1a6efd1a5046737b6179d99bdf193ccbfc (diff) | |
| download | emacs-3f8324e0de182945a809f63766cf9611aa45610c.tar.gz emacs-3f8324e0de182945a809f63766cf9611aa45610c.zip | |
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)
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/textmodes/ispell.el | 6 |
1 files changed, 6 insertions, 0 deletions
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." | |||
| 1173 | ;; Parse and set values for default dictionary. | 1173 | ;; Parse and set values for default dictionary. |
| 1174 | (setq hunspell-default-dict (or hunspell-multi-dict | 1174 | (setq hunspell-default-dict (or hunspell-multi-dict |
| 1175 | (car hunspell-default-dict))) | 1175 | (car hunspell-default-dict))) |
| 1176 | ;; If hunspell-default-dict is nil, ispell-parse-hunspell-affix-file | ||
| 1177 | ;; will barf with an error message that doesn't help users figure | ||
| 1178 | ;; out what is wrong. Produce an error message that points to the | ||
| 1179 | ;; root cause of the problem. | ||
| 1180 | (or hunspell-default-dict | ||
| 1181 | (error "Can't find Hunspell dictionary with a .aff affix file")) | ||
| 1176 | (setq hunspell-default-dict-entry | 1182 | (setq hunspell-default-dict-entry |
| 1177 | (ispell-parse-hunspell-affix-file hunspell-default-dict)) | 1183 | (ispell-parse-hunspell-affix-file hunspell-default-dict)) |
| 1178 | ;; Create an alist of found dicts with only names, except for default dict. | 1184 | ;; Create an alist of found dicts with only names, except for default dict. |