]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/textmodes/ispell.el: Fix finding dictionaries for Enchant.
authorReuben Thomas <rrt@sc3d.org>
Sun, 27 Jun 2021 21:08:40 +0000 (22:08 +0100)
committerReuben Thomas <rrt@sc3d.org>
Mon, 28 Jun 2021 12:39:50 +0000 (13:39 +0100)
(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

index 84d7208151a05d0b8315f648da3a4f6a189a4a45..ce5a57208541049f0b05c597baf3d99dae0c9116 100644 (file)
@@ -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