Function: feedmail-fill-to-cc-function
feedmail-fill-to-cc-function is a byte-compiled function defined in
feedmail.el.gz.
Signature
(feedmail-fill-to-cc-function HEADER-END)
Documentation
Smart filling of address headers (don't be fooled by the name).
The filling tries to avoid splitting lines except at commas. This avoids, in particular, splitting within parenthesized comments in addresses. Headers filled include From:, Reply-To:, To:, Cc:, Bcc:, Resent-To:, Resent-Cc:, and Resent-Bcc:.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/feedmail.el.gz
(defun feedmail-fill-to-cc-function (header-end)
"Smart filling of address headers (don't be fooled by the name).
The filling tries to avoid splitting lines except at commas. This
avoids, in particular, splitting within parenthesized comments in
addresses. Headers filled include From:, Reply-To:, To:, Cc:, Bcc:,
Resent-To:, Resent-Cc:, and Resent-Bcc:."
(feedmail-say-debug ">in-> feedmail-fill-to-cc-function")
(let ((case-fold-search t)
this-line
this-line-end)
(save-excursion
(goto-char (point-min))
;; iterate over all To:/Cc:, etc, lines
(while
(re-search-forward
"^\\(From:\\|Reply-To:\\|To:\\|Cc:\\|Bcc:\\|Resent-To:\\|Resent-Cc:\\|Resent-Bcc:\\)"
header-end t)
(setq this-line (match-beginning 0))
;; replace 0 or more leading spaces with a single space
(and (looking-at "[ \t]*") (replace-match " "))
(forward-line 1)
;; get any continuation lines
(while (and (looking-at "[ \t]+") (< (point) header-end))
(forward-line 1))
(setq this-line-end (point-marker))
(save-excursion (feedmail-fill-this-one this-line this-line-end))
))))