On Mon, Jan 09, 2006 at 01:53:13PM +0100, Agustin Martin wrote: > c) Run again flyspell-region on the same region > => if: Buffer french-LIZEZMOI has no process Just noticed that this becomes evident when ispell patch for "flyspell needs ispell-change-dictionary twice" is applied. When using current plain ispell.el from CVS this error message does not appear, but things are also buggy; although silently, dict is not changed. > > > However, if calling flyspell-accept-buffer-local-defs twice does no > > harm, it would be fine to move that call into flyspell-region. > > However, you are right, (flyspell-word) is the key here and if instead of > (c) you run flyspell-word over a word the same error appears. I think we can > handle this from ispell.el as part of the > ispell-change-dictionary+double-call problem making sure > flyspell-last-buffer is nil'ed on dict change if flyspell is loaded. this > way first call to flyspell-word would re-run > flyspell-accept-buffer-local-defs and skip that for further calls from the > same buffer. No need to add an explicit call in flyspell-small-region or > flyspell-region. > > This might also fix the original problem Piet described, but in a different > way (that looks compatible with the current fix, no need for changes there). I am attaching a possible patch for that. It is done on top of the (not yet installed) "flyspell needs ispell-change-dictionary twice" patch. It is the incremental one, [ispell.el.ispell-internal-change-dictionary+incremental.diff] (ispell-internal-change-dictionary) - Clear out flyspell-last-buffer if flyspell is loaded and dict is changed, so (flyspell-accept-buffer-local-defs) is re-run for the new values. I am also attaching the full patch for current ispell.el from CVS, so it can be tested better if previous patch is not yet installed when reading this mail. [ispell.el.ispell-internal-change-dictionary+full.diff] -- Agustin