[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: |
Sun, 30 Oct 2005 14:25:01 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) |
>>>>> "Richard M. Stallman" <address@hidden> (RMS) wrote:
>RMS> It is not obvious to me how to do that. Could you send the patch that
>RMS> you are proposing?
,----
| --- /Users/piet/Projects/cvs/emacs/lisp/textmodes/ispell.el.~1~
2005-10-24 09:17:22.000000000 +0200
| +++ /Users/piet/Projects/cvs/emacs/lisp/textmodes/ispell.el 2005-10-30
09:35:28.000000000 +0100
| @@ -579,7 +579,7 @@
| ("francais" ; Francais.aff
|
"[A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]"
|
"[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]"
| - "[-']" t nil "~list" iso-8859-1)
| + "[-'address@hidden" t nil "~list" iso-8859-1)
| ("francais-tex" ; Francais.aff
|
"[A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]"
|
"[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]"
`----
>RMS> One possible problem occurs to me: would adding . to this
>RMS> cause incorrect behavior at the end of nearly every sentence?
No. The `boundarychars' are only accepted between letters of the word, not
at the ends.
>RMS> Meanwhile, does this patch fix the problem? It tries to detect
>RMS> such cases, and recognize that the word has been found but can't
>RMS> really be checked.
>RMS> *** flyspell.el 25 Oct 2005 09:08:25 -0400 1.81
>RMS> --- flyspell.el 29 Oct 2005 12:06:29 -0400
>RMS> ***************
>RMS> *** 1356,1362 ****
>RMS> (progn
>RMS> (setq flyspell-large-region-beg (point))
>RMS> (goto-char (- (point) 1))
>RMS> ! (setq keep (flyspell-word)))
>RMS> (error "Bug: misspelled word `%s' (output pos %d) not
>found in buffer"
>RMS> word wordpos)))))))
>RMS> ;; we are done
>RMS> --- 1356,1365 ----
>RMS> (progn
>RMS> (setq flyspell-large-region-beg (point))
>RMS> (goto-char (- (point) 1))
>RMS> ! (if (< (length (flyspell-get-word following))
That should be: (if (< (length (car (flyspell-get-word nil)))
flyspell-word returns a triple (word startpos endpos)
>RMS> ! (length word))
>RMS> ! (setq keep nil)
>RMS> ! (setq keep (flyspell-word))))
>RMS> (error "Bug: misspelled word `%s' (output pos %d) not
>found in buffer"
>RMS> word wordpos)))))))
>RMS> ;; we are done
You can also factor out the "setq keep":
(setq keep
(if (< (length (car (flyspell-get-word nil)))
(length word))
nil
(flyspell-word))))
It solves the problem at hand. I can't think of any bad effects this would
have otherwise than missing some misspellings with a "." or "@" in it. I
wouldn't care much for the "@" because I think it shouldn't be there.
Anyhow, the ispell-dictionary-alist should be made compatible with the
definitions in the dictionaries.
--
Piet van Oostrum <address@hidden>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: address@hidden
- Re: flyspell bug, (continued)
- Re: flyspell bug, Agustin Martin, 2005/10/28
- Re: flyspell bug, Piet van Oostrum, 2005/10/28
- Re: flyspell bug, Slawomir Nowaczyk, 2005/10/28
- Re: flyspell bug, Richard M. Stallman, 2005/10/29
- Re: flyspell bug, Slawomir Nowaczyk, 2005/10/31
- Re: flyspell bug, Richard M. Stallman, 2005/10/29
- Re: flyspell bug, Piet van Oostrum, 2005/10/29
- Re: flyspell bug, David Kastrup, 2005/10/29
- Re: flyspell bug, Piet van Oostrum, 2005/10/29
- Re: flyspell bug, Richard M. Stallman, 2005/10/29
- Re: flyspell bug,
Piet van Oostrum <=
- Re: flyspell bug, Richard M. Stallman, 2005/10/30
- Re: flyspell bug, Agustin Martin, 2005/10/29
- Re: flyspell bug, Piet van Oostrum, 2005/10/30
- Re: flyspell bug, Agustin Martin, 2005/10/28