[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/flyspell.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/flyspell.el,v |
Date: |
Sun, 22 Oct 2006 21:29:34 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 06/10/22 21:29:33
Index: textmodes/flyspell.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/flyspell.el,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -b -r1.107 -r1.108
--- textmodes/flyspell.el 18 Oct 2006 04:13:46 -0000 1.107
+++ textmodes/flyspell.el 22 Oct 2006 21:29:33 -0000 1.108
@@ -1011,11 +1011,14 @@
(not (memq (char-after (1- start)) '(?\} ?\\)))))
flyspell-mark-duplications-flag
(save-excursion
- (goto-char (1- start))
- (let ((p (flyspell-word-search-backward
- word
- (- start (1+ (- end start))))))
- (and p (/= p (1- start))))))
+ (goto-char start)
+ (let* ((bound
+ (- start
+ (- end start)
+ (- (skip-chars-backward " \t\n\f"))))
+ (p (when (>= bound (point-min))
+ (flyspell-word-search-backward word bound))))
+ (and p (/= p start)))))
;; yes, this is a doublon
(flyspell-highlight-incorrect-region start end 'doublon)
nil)
@@ -1472,7 +1475,7 @@
(flyspell-word) ; Make sure current word is checked
(backward-word 1)
(while (and (< (point) end)
- (re-search-forward "\\b\\([^ \n\t]+\\)[ \n\t]+\\1\\b"
+ (re-search-forward "\\(\\w+\\)\\s-+\\1\\>"
end 'move))
(flyspell-word)
(backward-word 1))
@@ -1708,7 +1711,9 @@
;; now we can use a new overlay
(setq flyspell-overlay
(make-flyspell-overlay
- beg end 'flyspell-incorrect 'highlight)))))))
+ beg end
+ (if (eq poss 'doublon) 'flyspell-duplicate
'flyspell-incorrect)
+ 'highlight)))))))
;;*---------------------------------------------------------------------*/
;;* flyspell-highlight-duplicate-region ... */