Function: message-make-mail-followup-to
message-make-mail-followup-to is a byte-compiled function defined in
message.el.gz.
Signature
(message-make-mail-followup-to &optional ONLY-SHOW-SUBSCRIBED)
Documentation
Return the Mail-Followup-To header.
If passed the optional argument ONLY-SHOW-SUBSCRIBED only return the subscribed address (and not the additional To and Cc header contents).
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-make-mail-followup-to (&optional only-show-subscribed)
"Return the Mail-Followup-To header.
If passed the optional argument ONLY-SHOW-SUBSCRIBED only return the
subscribed address (and not the additional To and Cc header contents)."
(let* ((case-fold-search t)
(to (message-fetch-field "To"))
(cc (message-fetch-field "cc"))
(msg-recipients (concat to (and to cc ", ") cc))
(recipients
(mapcar #'mail-strip-quoted-names
(message-tokenize-header msg-recipients)))
(file-regexps
(if message-subscribed-address-file
(let (begin end item re)
(save-excursion
(with-temp-buffer
(insert-file-contents message-subscribed-address-file)
(while (not (eobp))
(setq begin (point))
(forward-line 1)
(setq end (point))
(if (bolp) (setq end (1- end)))
(setq item (regexp-quote (buffer-substring begin end)))
(if re (setq re (concat re "\\|" item))
(setq re (concat "\\`\\(" item))))
(and re (list (concat re "\\)\\'"))))))))
(mft-regexps (apply #'append message-subscribed-regexps
(mapcar #'regexp-quote
message-subscribed-addresses)
file-regexps
(mapcar #'funcall
message-subscribed-address-functions))))
(save-match-data
(let ((list
(cl-loop for recipient in recipients
when (cl-loop for regexp in mft-regexps
thereis (string-match regexp recipient))
return recipient)))
(when list
(if only-show-subscribed
list
msg-recipients))))))