Function: flyspell-small-region

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

Signature

(flyspell-small-region BEG END)

Documentation

Flyspell text between BEG and END.

This function is intended to work on small regions, as determined by flyspell-large-region(var)/flyspell-large-region(fun).

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/flyspell.el.gz
;;*---------------------------------------------------------------------*/
;;*    flyspell-small-region ...                                        */
;;*---------------------------------------------------------------------*/
(defun flyspell-small-region (beg end)
  "Flyspell text between BEG and END.

This function is intended to work on small regions, as
determined by `flyspell-large-region'."
  (save-excursion
    (if (> beg end)
	(let ((old beg))
	  (setq beg end)
	  (setq end old)))
    (goto-char beg)
    (let ((count 0))
      (while (< (point) end)
	(if (and flyspell-issue-message-flag (= count 100))
	    (progn
	      (message "Spell Checking...%d%%"
		       (floor (* 100.0 (- (point) beg)) (- end beg)))
	      (setq count 0))
	  (setq count (+ 1 count)))
	(flyspell-word)
	(sit-for 0)
	(let ((cur (point)))
	  (forward-word 1)
	  (if (and (< (point) end) (> (point) (+ cur 1)))
	      (backward-char 1)))))
    (backward-char 1)
    (if flyspell-issue-message-flag (message "Spell Checking completed."))
    (flyspell-word)))