[Top][All Lists]

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

Re: Changing dictionary while flyspell-buffer is running

From: Eli Zaretskii
Subject: Re: Changing dictionary while flyspell-buffer is running
Date: Wed, 20 Feb 2019 19:05:11 +0200

> From: Titus von der Malsburg <address@hidden>
> Date: Tue, 19 Feb 2019 23:58:19 +0100
> My question relates to flyspell-buffer.  When flyspell-buffer detects an
> incorrect word, language guessing is activated via
> fylspell-incorrect-hook but it’s not clear to me how to proceed next.  I
> think I’d have to kill the running ispell/aspell/hunspell process and
> restart with the new dictionary from where we left off.  Is there any
> infrastructure in Flyspell that makes this relatively easy and safe?  I
> had a look at the code and it seems that there is quite a bit of state
> in various places, so it’s probably not just a matter of killing a
> process, and doing things cleanly might require better understanding of
> the internals than I have.  Any advice one how to approach this would be
> appreciated.

There is already a command ispell-change-dictionary which does
everything that needs to be done when a dictionary is changed.  I
think you just need to invoke it.  If doing that during
flyspell-buffer somehow causes trouble, then do it after exiting
flyspell-buffer, then reinvoke flyspell-buffer or something.

reply via email to

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