Commit 887d14ad authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

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

in case as potential doublons (bug#5687).
parent c53dc7fc
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.
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment