14924f48f8
To decide the default value of ispell-program-name, Emacs looks in turn for a number of different binaries, and uses whichever it finds first. The snag with this approach is that, just because a binary is installed, doesnʼt mean that a dictionary in your language is installed for that binary. Since https://bugzilla.redhat.com/show_bug.cgi?id=713600 weʼve been patching the search list to look for Hunspell before Aspell, presumably because Hunspell dictionaries were considered more likely to be installed than the Aspell dictionaries. However, now we have Enchant, which will automatically select a backend based on a configuration preference, skipping over any backends for which youʼre missing a dictionary. This seems to be exactly what we want, so letʼs use it here.
23 lines
877 B
Diff
23 lines
877 B
Diff
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
|
|
index 65f61644b6..254c3e6a82 100644
|
|
--- a/lisp/textmodes/ispell.el
|
|
+++ b/lisp/textmodes/ispell.el
|
|
@@ -197,14 +197,11 @@ ispell-choices-win-default-height
|
|
:type 'integer
|
|
:group 'ispell)
|
|
|
|
-;; XXX Add enchant to this list once enchant >= 2.1.0 is widespread.
|
|
-;; Before that, adding it is useless, as if it is found, it will just
|
|
-;; cause an error; and one of the other spelling engines below is
|
|
-;; almost certainly installed in any case, for enchant to use.
|
|
(defcustom ispell-program-name
|
|
- (or (executable-find "aspell")
|
|
- (executable-find "ispell")
|
|
+ (or (executable-find "enchant-2")
|
|
(executable-find "hunspell")
|
|
+ (executable-find "aspell")
|
|
+ (executable-find "ispell")
|
|
"ispell")
|
|
"Program invoked by \\[ispell-word] and \\[ispell-region] commands."
|
|
:type 'string
|