1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

textmodes/flyspell.el (flyspell-word): Consider words that differ only

in case as potential doublons (bug#5687).
This commit is contained in:
Lars Magne Ingebrigtsen 2011-07-01 01:19:45 +02:00
parent c53dc7fca1
commit 887d14add7
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2011-06-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
* textmodes/flyspell.el (flyspell-word): Consider words that
differ only in case as potential doublons (bug#5687).
* net/soap-client.el (soap-invoke, soap-wsdl-resolve-references):
Remove two rather uninteresting debugging-like messages to make
debbugs.el more silent.

View File

@ -993,14 +993,17 @@ Mostly we check word delimiters."
;;*---------------------------------------------------------------------*/
;;* flyspell-word-search-backward ... */
;;*---------------------------------------------------------------------*/
(defun flyspell-word-search-backward (word bound)
(defun flyspell-word-search-backward (word bound &optional ignore-case)
(save-excursion
(let ((r '())
(inhibit-point-motion-hooks t)
p)
(while (and (not r) (setq p (search-backward word bound t)))
(let ((lw (flyspell-get-word)))
(if (and (consp lw) (string-equal (car lw) word))
(if (and (consp lw)
(if ignore-case
(equalp (car lw) word)
(string-equal (car lw) word)))
(setq r p)
(goto-char p))))
r)))
@ -1069,7 +1072,7 @@ misspelling and skips redundant spell-checking step."
(- end start)
(- (skip-chars-backward " \t\n\f"))))
(p (when (>= bound (point-min))
(flyspell-word-search-backward word bound))))
(flyspell-word-search-backward word bound t))))
(and p (/= p start)))))
;; yes, this is a doublon
(flyspell-highlight-incorrect-region start end 'doublon)