summaryrefslogtreecommitdiff
path: root/lisp/gnus/mml.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2008-01-30 07:57:28 +0000
committerMiles Bader <miles@gnu.org>2008-01-30 07:57:28 +0000
commitd235ca2ff8fab139ce797757fcb159d1e28fa7e0 (patch)
tree96c5cd1a06a0d9dc26e8470c6eabfc032c0046f3 /lisp/gnus/mml.el
parent3709a060f679dba14df71ae64a0035fa2b5b3106 (diff)
parent02cbe062bee38a6705bafb1699d77e3c44cfafcf (diff)
downloademacs-d235ca2ff8fab139ce797757fcb159d1e28fa7e0.tar.gz
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-324
Diffstat (limited to 'lisp/gnus/mml.el')
-rw-r--r--lisp/gnus/mml.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index da2e5bbbfc9..c335e985d0e 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -874,14 +874,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)