diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 6eaa0582aa..0240ef50bd 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1096,28 +1096,30 @@ ispell-find-hunspell-dictionaries in `ispell-dicts-name2locale-equivs-alist' if an explicit dictionary from that list was found." (let ((hunspell-found-dicts - (split-string - (with-temp-buffer - (ispell-call-process ispell-program-name - null-device - t - nil - "-D" - ;; Use -a to prevent Hunspell from - ;; trying to initialize its - ;; curses/termcap UI, which causes it - ;; to crash or fail to start in some - ;; MS-Windows ports. - "-a" - ;; Hunspell 1.7.0 (and later?) won't - ;; show LOADED DICTIONARY unless - ;; there's at least one file argument - ;; on the command line. So we feed - ;; it with the null device. - null-device) - (buffer-string)) - "[\n\r]+" - t)) + (seq-filter + #'file-name-absolute-p + (split-string + (with-temp-buffer + (ispell-call-process ispell-program-name + null-device + t + nil + "-D" + ;; Use -a to prevent Hunspell from + ;; trying to initialize its + ;; curses/termcap UI, which causes it + ;; to crash or fail to start in some + ;; MS-Windows ports. + "-a" + ;; Hunspell 1.7.0 (and later?) won't + ;; show LOADED DICTIONARY unless + ;; there's at least one file argument + ;; on the command line. So we feed + ;; it with the null device. + null-device) + (buffer-string)) + "[\n\r]+" + t))) hunspell-default-dict hunspell-default-dict-entry hunspell-multi-dict)