Function: nnmail-insert-lines

nnmail-insert-lines is a byte-compiled function defined in nnmail.el.gz.

Signature

(nnmail-insert-lines)

Documentation

Insert how many lines there are in the body of the mail.

Return the number of characters in the body.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nnmail.el.gz
(defun nnmail-insert-lines ()
  "Insert how many lines there are in the body of the mail.
Return the number of characters in the body."
  (let (lines chars)
    (save-excursion
      (goto-char (point-min))
      (unless (search-forward "\n\n" nil t)
	(goto-char (point-max))
	(insert "\n"))
      (setq chars (- (point-max) (point)))
      (setq lines (count-lines (point) (point-max)))
      (forward-char -1)
      (save-excursion
	(when (re-search-backward "^Lines: " nil t)
	  (delete-region (point) (progn (forward-line 1) (point)))))
      (beginning-of-line)
      (insert (format "Lines: %d\n" (max lines 0)))
      chars)))