Function: allout-count-trailing-whitespace-region

allout-count-trailing-whitespace-region is a byte-compiled function defined in allout.el.gz.

Signature

(allout-count-trailing-whitespace-region BEG END)

Documentation

Return number of trailing whitespace chars between BEG and END.

If BEG is bigger than END we return 0.

Source Code

;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_   > allout-count-trailing-whitespace-region (beg end)
(defun allout-count-trailing-whitespace-region (beg end)
  "Return number of trailing whitespace chars between BEG and END.

If BEG is bigger than END we return 0."
  (if (> beg end)
      0
    (save-match-data
      (save-excursion
        (goto-char beg)
        (let ((count 0))
          (while (re-search-forward "[  ][      ]*$" end t)
            (goto-char (1+ (match-beginning 2)))
            (setq count (1+ count)))
          count)))))