Subject: Re: bug#64075: 28.2; ispell broken on uncolored terminals

From: Eli Zaretskii <[email-masked]>
Date: Thu, 15 Jun 2023 10:48:56 +0300

> From: Al Petrofsky <[email-masked]>
> Date: Thu, 15 Jun 2023 02:34:48 -0400
> Cc: [email-masked], [email-masked]
> 
> What's anachronistic about that code (meaning the
> ispell-highlight-spelling-error-generic function) is that it uses a
> kludge that made it possible in pre-version-21 emacs to get some text
> displayed in inverse video on a tty even though emacs could not
> display faces on ttys.  But since Emacs 21, on any tty that has a
> termcap "so" capability, you can get inverse-video simply by using an
> inverse-video face.

That this was written before Emacs 21 doesn't yet make it not useful
now.

> So I don't think ispell-highlight-spelling-error-generic currently
> provides any functionality that isn't more conveniently and
> maintainably provided by ispell-highlight-spelling-error-overlay, with
> the additional benefit that the user can, if he wants, customize
> ispell-highlight-face to something other than inverse-video.

It's a working code whose replacement (basically, a cleanup) will mean
extra work for us, and all that for quite rare situations.  Based on
my long experience with Emacs, it also means some subtle bugs in some
even rarer use cases, which will take years to find and fix.  No,
thanks.

> (Making the default isearch face (and therefore the default
> ispell-highlight-face) be blue-on-magenta on color terminals but
> inverse-video on monochrome terminals is already handled
> automatically.)

You've ignored what I wrote about that possibility: when faces are
customized by users, they are usually customized in simplistic ways,
and are thus unlikely to work for all the cases.  IOW, once you allow
for face customizations, it is very hard to make sure this face will
still be distinct on a colorless terminal.

If you or someone wants to present a patch that will make more
terminals use ispell-highlight-spelling-error-overlay, and includes in
that patch a suitable change to the ispell-highlight-face, then I'll
gladly review it.  Otherwise, I see this issue as closed by that
last-year bugfix.