emacs-devel
[Top][All Lists]
Advanced

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

Re: flyspell bug


From: Richard M. Stallman
Subject: Re: flyspell bug
Date: Mon, 24 Oct 2005 12:27:32 -0400

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

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


*** flyspell.el 20 Oct 2005 00:27:34 -0400      1.80
--- flyspell.el 24 Oct 2005 11:50:52 -0400      
***************
*** 1333,1339 ****
      ;; Loop over incorrect words.
      (while (re-search-forward "\\([^\n]+\\)\n" (point-max) t)
        ;; Bind WORD to the next one.
!       (let ((word (match-string 1)))
        ;; Here there used to be code to see if WORD is the same
        ;; as the previous iteration, and count the number of consecutive
        ;; identical words, and the loop below would search for that many.
--- 1333,1339 ----
      ;; Loop over incorrect words.
      (while (re-search-forward "\\([^\n]+\\)\n" (point-max) t)
        ;; Bind WORD to the next one.
!       (let ((word (match-string 1)) (wordpos (point)))
        ;; Here there used to be code to see if WORD is the same
        ;; as the previous iteration, and count the number of consecutive
        ;; identical words, and the loop below would search for that many.
***************
*** 1349,1360 ****
        ;; but I didn't want to change it. -- rms.)
        (with-current-buffer flyspell-large-region-buffer
          (goto-char flyspell-large-region-beg)
!         (let ((keep t))
!           (while (and keep
!                       (search-forward word flyspell-large-region-end t))
!             (goto-char (- (point) 1))
!             (setq keep (flyspell-word)))
!           (setq flyspell-large-region-beg (point))))))
      ;; we are done
      (if flyspell-issue-message-flag (message "Spell Checking completed.")))
    ;; Kill and forget the buffer with the list of incorrect words.
--- 1349,1362 ----
        ;; but I didn't want to change it. -- rms.)
        (with-current-buffer flyspell-large-region-buffer
          (goto-char flyspell-large-region-beg)
!         (if (search-forward word flyspell-large-region-end t)
!             (progn
!               (setq flyspell-large-region-beg (point))
!               (goto-char (- (point) 1))
!               ;; (setq keep (flyspell-word))
!               (flyspell-word))
!           (error "Bug: misspelled word `%s' (output pos %d) not found in 
buffer"
!                  word wordpos)))))
      ;; we are done
      (if flyspell-issue-message-flag (message "Spell Checking completed.")))
    ;; Kill and forget the buffer with the list of incorrect words.




reply via email to

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