Subject: Re: bug#52179: Highlighting a word in `ispell' using `enchant'

From: Eli Zaretskii <[email-masked]>
Date: Wed, 25 May 2022 05:28:46 +0300

> From: Reuben Thomas <[email-masked]>
> Date: Tue, 24 May 2022 22:34:14 +0100
> Cc: Tor Kringeland <[email-masked]>, [email-masked]
> 
> Since ispell is the only spellchecker Emacs supports that can't cope with [[:alpha:]], it would seem more
> sensible to have a default (nil-keyed) setting in ispell-dictionary-base-alist, and to overwrite the default with
> [A-Za-z] only if the spellchecker is really ispell.
> 
> This way, duplicate code can be removed and future spellcheckers will not need to rediscover this problem.

That might be okay, but how does it help us get the Enchant support in
ispell.el DTRT?  We'd still need to detect when Ispell is used as the
back-end speller, no?

The issue here is that the current code already "patches" the nil case
to use [:alpha:] when Aspell or Hunspell are the spell-checker, and we
need to do that for Enchant.  If you are saying that Enchant doesn't
need to worry about the Ispell case, we could just modify
ispell-find-enchant-dictionaries to always "patch" the nil entry to
use [:alpha:], and leave the rest of the code, which already works,
intact.  If Enchant does need to cater to Ispell, we need a more
complex change, but again it's local th the Enchant support code.