Function: nroff-count-text-lines
nroff-count-text-lines is an interactive and byte-compiled function
defined in nroff-mode.el.gz.
Signature
(nroff-count-text-lines START END &optional PRINT)
Documentation
Count lines in region, except for nroff request lines.
All lines not starting with a period are counted up. Interactively, print result in echo area. Noninteractively, return number of non-request lines from START to END.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/nroff-mode.el.gz
(defun nroff-count-text-lines (start end &optional print)
"Count lines in region, except for nroff request lines.
All lines not starting with a period are counted up.
Interactively, print result in echo area.
Noninteractively, return number of non-request lines from START to END."
(interactive "r\np")
(if print
(message "Region has %d text lines" (nroff-count-text-lines start end))
(save-excursion
(save-restriction
(narrow-to-region start end)
(goto-char (point-min))
(- (buffer-size) (nroff-forward-text-line (buffer-size)))))))