From: morioka Date: Wed, 30 Sep 1998 14:27:35 +0000 (+0000) Subject: (mime-entity-content-type): New implementation. X-Git-Tag: chao-1_10-199811302358~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a3166e2923350ee23598a978f3d0521f69004f2d;p=elisp%2Fflim.git (mime-entity-content-type): New implementation. (mime-entity-content-disposition): New implementation. (mime-entity-encoding): New implementation. --- diff --git a/mime.el b/mime.el index 84e7b41..b5529c1 100644 --- a/mime.el +++ b/mime.el @@ -219,27 +219,30 @@ If MESSAGE is specified, it is regarded as root entity." field-body)) )))) -(defalias 'mime-entity-content-type 'mime-entity-content-type-internal) +(defun mime-entity-content-type (entity) + (or (mime-entity-content-type-internal entity) + (let ((ret (mime-fetch-field 'Content-Type entity))) + (if ret + (mime-entity-set-content-disposition-internal + entity (mime-parse-Content-Type ret)) + )))) (defun mime-entity-content-disposition (entity) (or (mime-entity-content-disposition-internal entity) (let ((ret (mime-fetch-field 'Content-Disposition entity))) (if ret - (let ((disposition (mime-parse-Content-Disposition ret))) - (when disposition - (mime-entity-set-content-disposition-internal - entity disposition) - disposition)))))) + (mime-entity-set-content-disposition-internal + entity (mime-parse-Content-Disposition ret)) + )))) (defun mime-entity-encoding (entity &optional default-encoding) (or (mime-entity-encoding-internal entity) - (let ((encoding - (or (let ((ret (mime-fetch-field - 'Content-Transfer-Encoding entity))) - (and ret (mime-parse-Content-Transfer-Encoding ret))) - default-encoding "7bit"))) - (mime-entity-set-encoding-internal entity encoding) - encoding))) + (let ((ret (mime-fetch-field 'Content-Transfer-Encoding entity))) + (mime-entity-set-encoding-internal + entity + (or (and ret (mime-parse-Content-Transfer-Encoding ret)) + default-encoding "7bit")) + ))) (defun mime-read-field (field-name &optional entity) (or (symbolp field-name)