]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from gnus--devo--0
authorMiles Bader <miles@gnu.org>
Thu, 24 Jan 2008 07:47:38 +0000 (07:47 +0000)
committerMiles Bader <miles@gnu.org>
Thu, 24 Jan 2008 07:47:38 +0000 (07:47 +0000)
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1009

lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/gnus/mm-decode.el
lisp/gnus/mml.el

index 569789888ddd23461b28d71eb65be52634573c24..dbba5fd608eeb64eeb9f3f37aead4a9879ef5c3a 100644 (file)
@@ -1,3 +1,11 @@
+2008-01-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * 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  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-article-describe-bindings): Make it possible to use
index 6e41f4136091c0d721485312f777dfb50ac0ef7d..f93a304be46a63caf34e8347c766c6d82eebeec4 100644 (file)
@@ -5455,9 +5455,7 @@ N is the numerical prefix."
             (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))
index 8e88ffca6bb134bfb13254fca3951e2cb0e2158a..f832a9c28e15096384fffa44372a432a091f55ef 100644 (file)
@@ -570,7 +570,10 @@ Postpone undisplaying of viewers for types in
          ;; 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
index 04f8ef4e4622efda5d9702439f3e1c27a8190c4f..2b5987e5e6eef77b92c2a8c77fffd329c819fb2f 100644 (file)
@@ -875,14 +875,19 @@ If HANDLES is non-nil, use it instead reparsing the buffer."
 
 (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)