summaryrefslogtreecommitdiff
path: root/lisp/textmodes/ispell.el
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2021-06-27 22:08:40 +0100
committerReuben Thomas <rrt@sc3d.org>2021-06-28 13:39:50 +0100
commit7c93009d11fd791f698e5cb7d0d281a82ccbb890 (patch)
tree73a8b522bee23a2feed8e0762572c71bb084767c /lisp/textmodes/ispell.el
parent881e75873dfb15077413d96c6606bbf042ab0a93 (diff)
downloademacs-7c93009d11fd791f698e5cb7d0d281a82ccbb890.tar.gz
* 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.
Diffstat (limited to 'lisp/textmodes/ispell.el')
-rw-r--r--lisp/textmodes/ispell.el13
1 files changed, 1 insertions, 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