+2004-12-21 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * rfc2231.el (rfc2231-parse-string): Decode encoded value after
+ concatenating segments rather than before concatenating them.
+ Suggested by ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.
+
+ * message.el (message-get-reply-headers): Bind `extra'.
+
+2004-12-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * message.el (message-extra-wide-headers): New variable.
+ (message-get-reply-headers): Use it.
+
2004-12-20 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-agent.el (gnus-agent-group-path): Decode group name.
: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
(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)
;; 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
(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 ", ".
(point) (progn (forward-sexp 1) (point))))))
(error "Invalid header: %s" string))
(setq c (char-after))
- (setq encoded nil)
(when (eq c ?*)
(forward-char 1)
(setq c (char-after))
(point) (progn (forward-sexp) (point)))))
(t
(error "Invalid header: %s" string)))
- (when encoded
- (setq value (rfc2231-decode-encoded-string value)))
(if number
(setq prev-attribute attribute
prev-value (concat prev-value value))
- (push (cons attribute value) parameters))))
+ (push (cons attribute
+ (if encoded
+ (rfc2231-decode-encoded-string value)
+ value))
+ parameters))))
;; Take care of any final continuations.
(when prev-attribute
- (push (cons prev-attribute prev-value) parameters))
+ (push (cons prev-attribute
+ (if encoded
+ (rfc2231-decode-encoded-string prev-value)
+ prev-value))
+ parameters))
(when type
`(,type ,@(nreverse parameters)))))))