Function: mail-indent-citation

mail-indent-citation is a byte-compiled function defined in sendmail.el.gz.

Signature

(mail-indent-citation)

Documentation

Modify text just inserted from a message to be cited.

The inserted text should be the region. When this function returns, the region is again around the modified text.

Normally, indent each nonblank line mail-indentation-spaces spaces. However, if mail-yank-prefix is non-nil, insert that prefix on each line.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/sendmail.el.gz
(defun mail-indent-citation ()
  "Modify text just inserted from a message to be cited.
The inserted text should be the region.
When this function returns, the region is again around the modified text.

Normally, indent each nonblank line `mail-indentation-spaces' spaces.
However, if `mail-yank-prefix' is non-nil, insert that prefix on each line."
  (mail-yank-clear-headers (region-beginning) (region-end))
  (if (null mail-yank-prefix)
      (indent-rigidly (region-beginning) (region-end)
		      mail-indentation-spaces)
    (save-excursion
      (let ((end (set-marker (make-marker) (region-end))))
	(goto-char (region-beginning))
	(while (< (point) end)
	  (insert mail-yank-prefix)
	  (forward-line 1))))))