From e3cd5361bea36ecd9c026bca93eb3e3809721e10 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Sun, 27 Jun 2021 22:08:40 +0100 Subject: [PATCH 3/3] * lisp/textmodes/ispell.el: Fix finding dictionaries for Enchant. (ispell-find-enchant-dictionaries): I originally copied this code from the equivalent code for Aspell. Unfortunately it was wrong for the case of Enchant: it should find only dictionaries that Enchant knows about, and not merge in `ispell-dictionary-base-alist' or add a default element, as these are dealt with in `ispell-set-spellchecker-params'. This caused a bug where the correct `-d' argument would not be added to the invocation of enchant, leading to the process not being correctly started. --- lisp/textmodes/ispell.el | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 8b799b08c0..5570800776 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1211,18 +1211,7 @@ ispell-find-enchant-dictionaries `(,lang "[[:alpha:]]" "[^[:alpha:]]" ,(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. - (dolist (dict ispell-dictionary-base-alist) - (unless (assoc (car dict) found) - (setq found (nconc found (list dict))))) - (setq ispell-enchant-dictionary-alist found) - ;; Add a default entry - (let ((default-dict - `(nil "[[:alpha:]]" "[^[:alpha:]]" - ,(ispell--get-extra-word-characters) - t nil nil utf-8))) - (push default-dict ispell-enchant-dictionary-alist)))) + (setq ispell-enchant-dictionary-alist found))) ;; Set params according to the selected spellchecker -- 2.25.1