[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49245: Enchant dictionaries list not being correctly set, and other
From: |
Eli Zaretskii |
Subject: |
bug#49245: Enchant dictionaries list not being correctly set, and other minor fixes |
Date: |
Mon, 28 Jun 2021 15:13:54 +0300 |
> Date: Sun, 27 Jun 2021 22:20:10 +0100
> From: Reuben Thomas via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> I found a bug recently where, when using Enchant as the back-end for
> ispell.el, spellchecking was locking up
> for some languages.
>
> This turned out to be the combination of two problems.
>
> First, ispell-find-enchant-dictionaries was incorrectly merging
> ispell-dictionary-base-alist into its result. This
> caused the ispell-set-spellchecker-params to fail to add the correct "-d
> LANG" flag arguments to the list of
> dictionaries that it used to start Enchant, which in turn meant that the
> process was started as e.g.
>
> enchant-2 -d francais # rather than -d fr_FR
>
> and failed to start properly. I have fixed this by simply removing the
> incorrect code (patch 0003 attached).
>
> Secondly, ispell.el failed to notice that it had not actually started an
> Enchant process, and hung while trying to
> read from it in ispell-accept-output. I fixed this by testing that the
> process is live before trying to read from or
> write to it (patch 0002 attached).
>
> Finally, while reading the source code I found an ancient comment that is
> more of a commit message in
> spirit (it explains how the current code came to be that way, rather than
> explaining something about how it
> works), so I removed it (patch 0001 attached).
>
> As usual with my infrequent patches, I would appreciate other eyes on them
> before I install them, if possible.
OK for the first 2 patches, but please don't remove that comment, it
explains something important, and there's no reason to remove it (or
many other similar comments we have throughout our code).
Thanks.