On Mon, Jan 19, 2009 at 05:49:07PM +0100, Angelo Graziosi wrote: > They are a few months I am working on several tex files on which I have > enabled flyspell-mode. These file have always been flyspelled correctly > using the italian dictionary without I choose it explicitly (I think > this happens because I have $LANG == it) > > I do weekly build of Emacs trunk on Cygwin and the above behaviour has > been conserved since many months. Also with the build I did on Jan 12 > 2009. (This pushed me to make the following theory: flyspell-mode 'see' > the 'LANG' env. var. and sets the default dict. accordingly. Right?) > > The build of few minutes ago has changed this (or my conjecture was > false): now all my files are spelled with english dictionary even if > Emacs says that (getenv "LANG") is 'it'! > > I have to set explicitly the 'it' dictionary. > > Is this new behaviour to be expected? or something changed between > 20090112 and today 20090119 ? > > Oops..., in the lisp/changelog I see: > > 2009-01-16 Agustín Martín > > * textmodes/flyspell.el (flyspell-post-command-hook): Do nothing > unless flyspell-mode is enabled. > (flyspell-pre-point): Make buffer-local. No, the reason for the change is not there, but in ispell.el 1.244 2009-01-16 Agustín Martín * textmodes/ispell.el (ispell-find-aspell-dictionaries): ... Use correct dictionary alist for default. if, as I guess, you use aspell. As a matter of fact, you should have found the behavior you currently find until ispell.el 1.228 (Thu Apr 24 2008). Before that, if an english aspell dict was found, it was made the default, otherwise first entry in ispell-dictionary-alist-1 was used. When moving to the new scheme, the alist name was not updated, so ispell.el tried first to find 'en' in the original alist, not in the aspell dicts alist, and since it was never found there the fallback first entry was always used for default. In the above change, 'en' is now found in the correct alist, so if an english dict is installed it is used as default. Note that this change did nothing else than making the code work as expected. There is room for discussion about what should be 'expected'. I am beginning to think that we should just set aspell default as the current fallback default, without trying english first. If there are no objections, I will commit attached patch. As a matter of fact 'en' precedence did not work for a long time and there were no complaints about that. -- Agustin