Subject: bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs

From: Reuben Thomas <[email-masked]>
Date: Fri, 4 Sep 2020 02:07:51 +0100

(As I've not been active for a while, I'd appreciate a review of this
admittedly trivial patch; I plan to make another few patches to ispell.el.)

I attach a patch to fix an XXX and add "enchant-2" to the list of spelling
checker programs checked by default. The XXX comment noted that enchant >=
2.1.0 is required by ispell.el; the good news is that enchant is now
commonly installed under the name "enchant-2", which is likely to be a
suitable version (2.0.x releases were not widely adopted), so rather than
look for "enchant" (perhaps that will come later), we can now look for
"enchant-2".

-- 
https://rrt.sc3d.org
From 90a0a5ec364efb8207c1b4e1b9b539634135cf3e Mon Sep 17 00:00:00 2001
From: Reuben Thomas <[email-masked]>
Date: Fri, 4 Sep 2020 01:58:04 +0100
Subject: [PATCH] Add enchant-2 to list of default spelling checker programs

* lisp/textmodes/ispell.el (ispell-program-name): Check `enchant-2',
as it is likely to be a suitable version. Enchant 2 seems to be
commonly installed under this name, so we don't have to worry about
checking `enchant'.
---
 lisp/textmodes/ispell.el | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 86452ff1e8..8281f1d6bd 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -198,14 +198,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")
       (executable-find "hunspell")
+      (executable-find "enchant-2")
       "ispell")
   "Program invoked by \\[ispell-word] and \\[ispell-region] commands."
   :type 'string
-- 
2.25.1