emacs-devel
[Top][All Lists]
Advanced

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

Possible patch for Localwords handling in flyspell flyspell-large-region


From: Agustin Martin
Subject: Possible patch for Localwords handling in flyspell flyspell-large-region
Date: Mon, 17 Oct 2005 19:03:11 +0200
User-agent: Mutt/1.5.9i

Hi,

I am attaching a possible patch for handling localwords in
flyspell-large-region function. The reason for this is as follows.

I have been using flyspell in a large file having a number of words declared
valid in LocalWords for that file, and running flyspell-buffer is rather
slow, because all mispellings given by 'ispell -l' are checked, even if they
are declared as valid in LocalWords.

I have been playing with a possible way to speed up the process, it
essentially consists on removing valid words (declared in LocalWords) from
the mispellings buffer that contains the 'ispell -l' output *before* they
are checked by regular flyspell means.

That is,

a) Parse buffer being spellchecked and put words in LocalWords in a list.
b) Remove from mispellings buffer lines that match elements of that list.
c) Proceed as usual.

I also needed to remove overlays in the region each time, otherwise when a
word is added to LocalWords and flyspell-buffer run again, it would remain
marked. LocalWords parsing code is stolen from ispell.el.

I already submitted the patch to Manuel Serrano, and has been
incorporated into flyspell-1.7j.el. 

I am attaching the patch as went finally into flyspell-1.7j.el, with a minor
change to apply cleanly to emacs-cvs flyspell.el.

Hope this is useful,

[Please CC me on replies, I am not subscribed to emacs-devel]

Cheers,

-- 
Agustin

Attachment: flyspell.el.emacs-cvs-patch
Description: Text document


reply via email to

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