diff options
| author | Lars Magne Ingebrigtsen | 2011-07-01 01:19:45 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2011-07-01 01:19:45 +0200 |
| commit | 887d14add7ac21ae466f37208f347f860db33765 (patch) | |
| tree | c83f18be3cbe6674d1d8ea620b232ddfd090ce85 | |
| parent | c53dc7fca19dfd2e3abdddfdefae06ff8d620f32 (diff) | |
| download | emacs-887d14add7ac21ae466f37208f347f860db33765.tar.gz emacs-887d14add7ac21ae466f37208f347f860db33765.zip | |
textmodes/flyspell.el (flyspell-word): Consider words that differ only
in case as potential doublons (bug#5687).
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/textmodes/flyspell.el | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c1c213d1440..1ce1eb61f14 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-06-30 Lars Magne Ingebrigtsen <larsi@gnus.org> | 1 | 2011-06-30 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * textmodes/flyspell.el (flyspell-word): Consider words that | ||
| 4 | differ only in case as potential doublons (bug#5687). | ||
| 5 | |||
| 3 | * net/soap-client.el (soap-invoke, soap-wsdl-resolve-references): | 6 | * net/soap-client.el (soap-invoke, soap-wsdl-resolve-references): |
| 4 | Remove two rather uninteresting debugging-like messages to make | 7 | Remove two rather uninteresting debugging-like messages to make |
| 5 | debbugs.el more silent. | 8 | debbugs.el more silent. |
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index bc8644be786..7bb3323eb17 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -993,14 +993,17 @@ Mostly we check word delimiters." | |||
| 993 | ;;*---------------------------------------------------------------------*/ | 993 | ;;*---------------------------------------------------------------------*/ |
| 994 | ;;* flyspell-word-search-backward ... */ | 994 | ;;* flyspell-word-search-backward ... */ |
| 995 | ;;*---------------------------------------------------------------------*/ | 995 | ;;*---------------------------------------------------------------------*/ |
| 996 | (defun flyspell-word-search-backward (word bound) | 996 | (defun flyspell-word-search-backward (word bound &optional ignore-case) |
| 997 | (save-excursion | 997 | (save-excursion |
| 998 | (let ((r '()) | 998 | (let ((r '()) |
| 999 | (inhibit-point-motion-hooks t) | 999 | (inhibit-point-motion-hooks t) |
| 1000 | p) | 1000 | p) |
| 1001 | (while (and (not r) (setq p (search-backward word bound t))) | 1001 | (while (and (not r) (setq p (search-backward word bound t))) |
| 1002 | (let ((lw (flyspell-get-word))) | 1002 | (let ((lw (flyspell-get-word))) |
| 1003 | (if (and (consp lw) (string-equal (car lw) word)) | 1003 | (if (and (consp lw) |
| 1004 | (if ignore-case | ||
| 1005 | (equalp (car lw) word) | ||
| 1006 | (string-equal (car lw) word))) | ||
| 1004 | (setq r p) | 1007 | (setq r p) |
| 1005 | (goto-char p)))) | 1008 | (goto-char p)))) |
| 1006 | r))) | 1009 | r))) |
| @@ -1069,7 +1072,7 @@ misspelling and skips redundant spell-checking step." | |||
| 1069 | (- end start) | 1072 | (- end start) |
| 1070 | (- (skip-chars-backward " \t\n\f")))) | 1073 | (- (skip-chars-backward " \t\n\f")))) |
| 1071 | (p (when (>= bound (point-min)) | 1074 | (p (when (>= bound (point-min)) |
| 1072 | (flyspell-word-search-backward word bound)))) | 1075 | (flyspell-word-search-backward word bound t)))) |
| 1073 | (and p (/= p start))))) | 1076 | (and p (/= p start))))) |
| 1074 | ;; yes, this is a doublon | 1077 | ;; yes, this is a doublon |
| 1075 | (flyspell-highlight-incorrect-region start end 'doublon) | 1078 | (flyspell-highlight-incorrect-region start end 'doublon) |