emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More problems with flyspell


From: Agustin Martin
Subject: Re: More problems with flyspell
Date: Fri, 6 Jan 2006 01:11:20 +0100
User-agent: Mutt/1.5.9i

On Thu, Jan 05, 2006 at 02:37:42PM +0100, Piet van Oostrum wrote:
> Some recent changes in flyspell.el (flyspell-accept-buffer-local-defs) have
> caused me a problem. It hit me when I updated my CVS emacs this week:
> 
> I want my email and news messages to be flyspell-checked automatically,
> preferably with the right language. So in mail-mode-hook, message-mode-hook
> and vm-mail-mode-hook I run a function that installs a first-change-hook.
> In the latter I do some regular expression grepping to guess what language
> the message is in. This only works when replying to a message, for an new
> message the default is "Dutch". When I am going to enter a new message in
> English, I manually run a command to reset it to English. Each time I call
> (flyspell-mode 1). This used to work, but stopped with the recent version.
> The reason is the optimization in flyspell-accept-buffer-local-defs. It
> won't restart ispell because there was no buffer change.
> So I think when
> flyspell-accept-buffer-local-defs is called from flyspell-mode-on it should
> do its work unconditionally. This can be done by setting
> flyspell-last-buffer to nil in flyspell-mode-on.
> 
> Or maybe another solution is to give flyspell-accept-buffer-local-defs a
> parameter that tells whether to do the optimization and only do it in
> time-critical situations.

While we are with this, I have noticed that
flyspell-accept-buffer-local-defs is called from flyspell-large-region, but
not from flyspell-small-region. By the way, since none of both is supposed
to be called directly, might be better to move that call to flyspell-region.
that is the interactive function that will internally call
flyspell-{large,small}-region. Since I would expect this to be affected by
the same problem the preferred fix from those you propose above should also
be applied here.

-- 
Agustin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]