[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 7c93009 2/2: * lisp/textmodes/ispell.el: Fix finding dictionaries
From: |
Reuben Thomas |
Subject: |
master 7c93009 2/2: * lisp/textmodes/ispell.el: Fix finding dictionaries for Enchant. |
Date: |
Mon, 28 Jun 2021 08:42:23 -0400 (EDT) |
branch: master
commit 7c93009d11fd791f698e5cb7d0d281a82ccbb890
Author: Reuben Thomas <rrt@sc3d.org>
Commit: Reuben Thomas <rrt@sc3d.org>
* 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 84d7208..ce5a572 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