Function: flyspell-check-region-doublons

flyspell-check-region-doublons is a byte-compiled function defined in flyspell.el.gz.

Signature

(flyspell-check-region-doublons BEG END)

Documentation

Check for adjacent duplicated words (doublons) in the given region.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/flyspell.el.gz
;;* ---------------------------------------------------------------
;;*     flyspell-check-region-doublons
;;* ---------------------------------------------------------------
(defun flyspell-check-region-doublons (beg end)
  "Check for adjacent duplicated words (doublons) in the given region."
  (save-excursion
    (goto-char beg)
    (flyspell-word)     ; Make sure current word is checked
    (backward-word 1)
    (while (and (< (point) end)
		(re-search-forward "\\<\\(\\w+\\)\\>[ \n\t\f]+\\1\\>"
				   end 'move))
      (flyspell-word)
      (backward-word 1))
    (flyspell-word)))