[Top][All Lists]

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

Re: flyspell bug

From: Piet van Oostrum
Subject: Re: flyspell bug
Date: Mon, 24 Oct 2005 19:51:22 +0200

>>>>> "Richard M. Stallman" <address@hidden> (RMS) wrote:

>RMS>     When I check it, it is considered a misspelling. Maybe it is in your
>RMS>     personal dictionary?

>RMS> That was indeed the reason.  Trying it with an empty personal
>RMS> dictionary, I observed the bug.  This patch seems to work; does it
>RMS> give good results?

No, not completely. For example in the following (as part of a larger text):

% GNU Emacs is free software; you can redistribute it and/or modify
% it under the redist terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2, or (at your option)
% any later version.

I inserted the word "redist" in the second line, which is misspelled.
However, your code misses this word, because it finds
"redistributable" first and that is accepted by flyspell-word. The
original code continues and finds "redist" the next time in the inner
loop. However, that code can only work correctly when both ispell the
program, and ispell.el have the same ideas about TeX commands to skip.

I can even imagine that the checking loop goes out of sync with a
somewhat more contorted example.

Maybe a solution is to change the search-forward into an exact-word
search, i.e. change word into a regexp with word-boundary matches.
Then it should use the same ideas about words as ispell, and the
regexp would slow it down, unfortunately.

And now I think of it, are there no problems to be expected with
capitalized words where one form is correct and the other (e.g. the
lowercase one) is incorrect, with case-fold-search = true?
Piet van Oostrum <address@hidden>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: address@hidden

reply via email to

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