From: Reuben Thomas Date: Mon, 7 Sep 2020 19:56:58 +0000 (+0100) Subject: Fix Enchant dictionary finding routine X-Git-Tag: emacs-28.0.90~6195 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=151486931c82f6af38a912631c9cd41b677aae47;p=emacs.git Fix Enchant dictionary finding routine * lisp/textmodes/ispell.el (ispell-find-enchant-dictionaries): Don’t pass `buffer-string' to enchant-lsmod. Remove zero-length substrings from the split output of `enchant-lsmod`, as the output ends with a separator. Pass the current language to `ispell--get-extra-word-characters', so we get the result for the current language, not the default language. (Patch from Jorge P. de Morais Neto.) --- diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 11f90f41a8b..a99dfe40670 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1236,11 +1236,11 @@ If LANG is omitted, get the extra word characters for the default language." "Find Enchant's dictionaries, and record in `ispell-enchant-dictionary-alist'." (let* ((dictionaries (split-string - (ispell--call-enchant-lsmod "-list-dicts" (buffer-string)) " ([^)]+)\n")) + (ispell--call-enchant-lsmod "-list-dicts") " ([^)]+)\n" t)) (found (mapcar #'(lambda (lang) `(,lang "[[:alpha:]]" "[^[:alpha:]]" - ,(ispell--get-extra-word-characters) t nil nil utf-8)) + ,(ispell--get-extra-word-characters lang) t nil nil utf-8)) dictionaries))) ;; Merge into FOUND any elements from the standard ispell-dictionary-base-alist ;; which have no element in FOUND at all.