Synch to No Gnus 200501120840.
[elisp/gnus.git-] / lisp / message.el
index 2b8abe7..55d5f2d 100644 (file)
@@ -772,6 +772,12 @@ and respond with new To and Cc headers."
   :link '(custom-manual "(message)Followup")
   :type '(choice function (const nil)))
 
+(defcustom message-extra-wide-headers nil
+  "If non-nil, a list of additional address headers.
+These are used when composing a wide reply."
+  :group 'message-sending
+  :type '(repeat string))
+
 (defcustom message-use-followup-to 'ask
   "*Specifies what to do with Followup-To header.
 If nil, always ignore the header.  If it is t, use its value, but
@@ -6295,7 +6301,7 @@ OTHER-HEADERS is an alist of header/value pairs."
                     (Subject . ,(or subject ""))))))
 
 (defun message-get-reply-headers (wide &optional to-address address-headers)
-  (let (follow-to mct never-mct to cc author mft recipients)
+  (let (follow-to mct never-mct to cc author mft recipients extra)
     ;; Find all relevant headers we need.
     (save-restriction
       (message-narrow-to-headers-or-head)
@@ -6306,10 +6312,15 @@ OTHER-HEADERS is an alist of header/value pairs."
        ;; message-header-synonyms.
        (setq to (or (message-fetch-field "to")
                     (and (loop for synonym in message-header-synonyms
-                           when (memq 'Original-To synonym)
-                           return t)
+                               when (memq 'Original-To synonym)
+                               return t)
                          (message-fetch-field "original-to")))
              cc (message-fetch-field "cc")
+             extra (when message-extra-wide-headers
+                     (mapconcat 'identity
+                                (mapcar 'message-fetch-field
+                                        message-extra-wide-headers)
+                                ", "))
              mct (when message-use-mail-copies-to
                    (message-fetch-field "mail-copies-to"))
              author (or mrt
@@ -6396,8 +6407,9 @@ responses here are directed to other addresses.")))
        (if mct (setq recipients (concat recipients ", " mct))))
        (t
        (setq recipients (if never-mct "" (concat ", " author)))
-       (if to  (setq recipients (concat recipients ", " to)))
-       (if cc  (setq recipients (concat recipients ", " cc)))
+       (if to (setq recipients (concat recipients ", " to)))
+       (if cc (setq recipients (concat recipients ", " cc)))
+       (if extra (setq recipients (concat recipients ", " extra)))
        (if mct (setq recipients (concat recipients ", " mct)))))
       (if (>= (length recipients) 2)
          ;; Strip the leading ", ".