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.
;;*---------------------------------------------------------------------*/
;;* 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)))
(- 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)