# HG changeset patch # User Miles Bader # Date 1201160858 0 # Node ID a5b33bf9597c8704d5c339dad01b520df4d4700d # Parent 6030481eb6c8484b6a933ebb75862a35fb9180c8 Merge from gnus--devo--0 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1009 diff -r 6030481eb6c8 -r a5b33bf9597c lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Thu Jan 24 04:50:50 2008 +0000 +++ b/lisp/gnus/ChangeLog Thu Jan 24 07:47:38 2008 +0000 @@ -1,3 +1,11 @@ +2008-01-23 Katsumi Yamaoka + + * gnus-art.el (gnus-insert-mime-button): Don't decode description. + + * mm-decode.el (mm-dissect-buffer): Decode description. + + * mml.el (mml-to-mime): Encode message header first. + 2008-01-18 Katsumi Yamaoka * gnus-art.el (gnus-article-describe-bindings): Make it possible to use diff -r 6030481eb6c8 -r a5b33bf9597c lisp/gnus/gnus-art.el --- a/lisp/gnus/gnus-art.el Thu Jan 24 04:50:50 2008 +0000 +++ b/lisp/gnus/gnus-art.el Thu Jan 24 07:47:38 2008 +0000 @@ -5455,9 +5455,7 @@ (mail-content-type-get (mm-handle-type handle) 'url) "")) (gnus-tmp-type (mm-handle-media-type handle)) - (gnus-tmp-description - (mail-decode-encoded-word-string (or (mm-handle-description handle) - ""))) + (gnus-tmp-description (or (mm-handle-description handle) "")) (gnus-tmp-dots (if (if displayed (car displayed) (mm-handle-displayed-p handle)) diff -r 6030481eb6c8 -r a5b33bf9597c lisp/gnus/mm-decode.el --- a/lisp/gnus/mm-decode.el Thu Jan 24 04:50:50 2008 +0000 +++ b/lisp/gnus/mm-decode.el Thu Jan 24 07:47:38 2008 +0000 @@ -570,7 +570,10 @@ ;; creates unibyte buffers. This `if', though not a perfect ;; solution, avoids most of them. (if from - (setq from (cadr (mail-extract-address-components from)))))) + (setq from (cadr (mail-extract-address-components from)))) + (if description + (setq description (mail-decode-encoded-word-string + description))))) (if (or (not ctl) (not (string-match "/" (car ctl)))) (mm-dissect-singlepart diff -r 6030481eb6c8 -r a5b33bf9597c lisp/gnus/mml.el --- a/lisp/gnus/mml.el Thu Jan 24 04:50:50 2008 +0000 +++ b/lisp/gnus/mml.el Thu Jan 24 07:47:38 2008 +0000 @@ -875,14 +875,19 @@ (defun mml-to-mime () "Translate the current buffer from MML to MIME." - (message-encode-message-body) + ;; `message-encode-message-body' will insert an encoded Content-Description + ;; header in the message header if the body contains a single part + ;; that is specified by a user with a MML tag containing a description + ;; token. So, we encode the message header first to prevent the encoded + ;; Content-Description header from being encoded again. (save-restriction (message-narrow-to-headers-or-head) ;; Skip past any From_ headers. (while (looking-at "From ") (forward-line 1)) (let ((mail-parse-charset message-default-charset)) - (mail-encode-encoded-word-buffer)))) + (mail-encode-encoded-word-buffer))) + (message-encode-message-body)) (defun mml-insert-mime (handle &optional no-markup) (let (textp buffer mmlp)