From: yamaoka Date: Tue, 21 Dec 2004 09:38:12 +0000 (+0000) Subject: Synch to No Gnus 200412210937. X-Git-Tag: t-gnus-6_17_4-quimby-~623 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a13588051fdc88c98aeaed97af04a44750ecb91a;p=elisp%2Fgnus.git- Synch to No Gnus 200412210937. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 17758a5..82add65 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2004-12-21 Katsumi Yamaoka + + * rfc2231.el (rfc2231-parse-string): Decode encoded value after + concatenating segments rather than before concatenating them. + Suggested by ARISAWA Akihiro . + + * message.el (message-get-reply-headers): Bind `extra'. + +2004-12-21 Lars Magne Ingebrigtsen + + * message.el (message-extra-wide-headers): New variable. + (message-get-reply-headers): Use it. + 2004-12-20 Katsumi Yamaoka * gnus-agent.el (gnus-agent-group-path): Decode group name. diff --git a/lisp/message.el b/lisp/message.el index 2b8abe7..55d5f2d 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -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 ", ". diff --git a/lisp/rfc2231.el b/lisp/rfc2231.el index 20e1d7c..444ca0b 100644 --- a/lisp/rfc2231.el +++ b/lisp/rfc2231.el @@ -88,7 +88,6 @@ The list will be on the form (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)) @@ -126,16 +125,22 @@ The list will be on the form (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)))))))