From 7c93009d11fd791f698e5cb7d0d281a82ccbb890 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Sun, 27 Jun 2021 22:08:40 +0100 Subject: [PATCH] * 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 84d7208151a..ce5a5720854 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1211,18 +1211,7 @@ If LANG is omitted, get the extra word characters for the default language." `(,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.39.2