Function: checkdoc-sentencespace-region-engine

checkdoc-sentencespace-region-engine is a byte-compiled function defined in checkdoc.el.gz.

Signature

(checkdoc-sentencespace-region-engine BEGIN END)

Documentation

Make sure all sentences have double spaces between BEGIN and END.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/checkdoc.el.gz
(defun checkdoc-sentencespace-region-engine (begin end)
  "Make sure all sentences have double spaces between BEGIN and END."
  (if sentence-end-double-space
      (save-excursion
	(let ((case-fold-search nil)
	      (errtxt nil) bb be)
	  (with-syntax-table checkdoc-syntax-table
            (goto-char begin)
            (while (re-search-forward "[^ .0-9]\\(\\. \\)[^ \n]" end t)
              (let ((b (match-beginning 1))
                    (e (match-end 1)))
                (unless (or (checkdoc-in-sample-code-p begin end)
                            (checkdoc-in-example-string-p begin end)
                            (checkdoc-in-abbreviation-p b))
                  (if (checkdoc-autofix-ask-replace
                       b e
                       "There should be two spaces after a period.  Fix?"
                       ".  ")
                      nil
                    (if errtxt
                        ;; If there is already an error, then generate
                        ;; the warning output if applicable
                        (if checkdoc-generate-compile-warnings-flag
                            (checkdoc-create-error
                             "There should be two spaces after a period"
                             b e))
                      (setq errtxt
                            "There should be two spaces after a period"
                            bb b be e)))))))
	  (if errtxt (checkdoc-create-error errtxt bb be))))))