From 6e508b07b01f62511e356b34b9a0fa8454dcedf3 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sun, 16 Nov 2014 13:32:45 +0000 Subject: [PATCH] Don't error when no default Hunspell dictionary is detected. This happens when "hunspell -D" does not report a "LOADED DICTIONARY". --- lisp/textmodes/ispell.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 5cdae22..cd77eda 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1291,10 +1291,12 @@ entries if a specific dict was found." ;; Parse and set values for default dictionary. (setq hunspell-default-dict (car hunspell-default-dict)) (setq hunspell-default-dict-entry - (ispell-parse-hunspell-affix-file hunspell-default-dict)) + (and hunspell-default-dict + (ispell-parse-hunspell-affix-file hunspell-default-dict))) ;; Create an alist of found dicts with only names, except for default dict. (setq ispell-hunspell-dictionary-alist - (list (append (list nil) (cdr hunspell-default-dict-entry)))) + (and hunspell-default-dict-entry + (list (append (list nil) (cdr hunspell-default-dict-entry))))) (dolist (dict (mapcar 'car ispell-hunspell-dict-paths-alist)) (if (string= dict hunspell-default-dict) (add-to-list 'ispell-hunspell-dictionary-alist -- 1.8.3.1