Subject: bug#49982: 27.2; ispell.el fails to find a Hunspell dictionary to use as default despite ispell-dictionary being set

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 22 Aug 2022 14:57:59 +0200

Kisaragi Hiu <[email-masked]> writes:

> This configuration should be everything that's needed for ispell.el to
> work with Hunspell, regardless of system locale:
>
>     (setq ispell-program-name (executable-find "hunspell")
>           ispell-dictionary "en_US"))
>
> However, when system locale (the LANG environment variable) does not
> have a corresponding Hunspell dictionary,
> `ispell-find-hunspell-dictionaries` returns the error "Can't find
> Hunspell dictionary with a .aff affix file", despite ispell-dictionary
> being set.

I've now fixed this in Emacs 29 (by first using our current rules, and
then trying again with -d ispell-dictionary).