From fd03e24ed943e197e4af82c284be8ad80a1ad2b3 Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 21 Jun 1998 14:52:48 +0000 Subject: [PATCH] (mime-text-insert-decoded-body): Use function `mime-entity-cooked-p'. --- mime-text.el | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/mime-text.el b/mime-text.el index 666bb74..04e23b8 100644 --- a/mime-text.el +++ b/mime-text.el @@ -36,26 +36,18 @@ It decodes MIME-encoding then code-converts as MIME-charset. MIME-encoding is value of field 'encoding of SITUATION. It must be 'nil or string. MIME-charset is value of field \"charset\" of SITUATION. It must be symbol." - (let* ((buffer (mime-entity-buffer entity)) - (presentation-type - (save-excursion - (set-buffer buffer) - (or mime-raw-representation-type - (cdr (or (assq major-mode mime-raw-representation-type-alist) - (assq t mime-raw-representation-type-alist))) - )))) - (let ((str (mime-entity-content entity))) - (insert - (if (or (eq presentation-type 'binary) - (not (member (mime-entity-encoding entity) - '(nil "7bit" "8bit" "binary")))) - (decode-mime-charset-string - str - (or (mime-content-type-parameter - (mime-entity-content-type entity) "charset") - default-mime-charset)) - str)) - )) + (let ((str (mime-entity-content entity))) + (insert + (if (and (mime-entity-cooked-p entity) + (member (mime-entity-encoding entity) + '(nil "7bit" "8bit" "binary"))) + str + (decode-mime-charset-string str + (or (mime-content-type-parameter + (mime-entity-content-type entity) + "charset") + default-mime-charset)) + ))) (run-hooks 'mime-text-decode-hook) ) -- 1.7.10.4