From eba054ec40ef50f68718b99bff238e17e9d51945 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 23 Jan 2006 04:41:31 +0000 Subject: [PATCH] Synch to No Gnus 200601230440. --- lisp/ChangeLog | 5 +++++ lisp/mm-uu.el | 38 +++++++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2df51c8..fae2be9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-01-23 Katsumi Yamaoka + + * mm-uu.el (mm-uu-dissect-text-parts): Decode content transfer + encoding. + 2006-01-20 Reiner Steib * message.el (message-tool-bar-zap-list, message-tool-bar) diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index ec51314..e518993 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -620,24 +620,32 @@ value of `mm-uu-text-plain-type'." (defun mm-uu-dissect-text-parts (handle) "Dissect text parts and put uu handles into HANDLE." - (let ((buffer (mm-handle-buffer handle)) - (case-fold-search t) - type children) + (let ((buffer (mm-handle-buffer handle))) (cond ((stringp buffer) (mapc 'mm-uu-dissect-text-parts (cdr handle))) ((bufferp buffer) - (when (and (setq type (mm-handle-media-type handle)) - (stringp type) - ;; Mutt still uses application/pgp even though - ;; it has already been withdrawn. - (string-match "\\`text/\\|\\`application/pgp\\'" type) - (with-current-buffer buffer - (setq children - (mm-uu-dissect t (mm-handle-type handle))))) - (kill-buffer buffer) - (setcar handle (car children)) - (setcdr handle (cdr children)) - (mm-uu-dissect-text-parts handle))) + (let ((type (mm-handle-media-type handle)) + (case-fold-search t) ;; string-match + encoding children) + (when (and + (stringp type) + ;; Mutt still uses application/pgp even though + ;; it has already been withdrawn. + (string-match "\\`text/\\|\\`application/pgp\\'" type) + (setq children + (with-current-buffer buffer + (if (setq encoding (mm-handle-encoding handle)) + ;; Inherit the multibyteness of the `buffer'. + (with-temp-buffer + (insert-buffer-substring buffer) + (mm-decode-content-transfer-encoding + encoding type) + (mm-uu-dissect t (mm-handle-type handle))) + (mm-uu-dissect t (mm-handle-type handle)))))) + (kill-buffer buffer) + (setcar handle (car children)) + (setcdr handle (cdr children)) + (mm-uu-dissect-text-parts handle)))) (t (mapc 'mm-uu-dissect-text-parts handle))))) -- 1.7.10.4