From: morioka Date: Fri, 3 Jul 1998 15:22:54 +0000 (+0000) Subject: (mime-entity-encoding): Add new optional argument `default-encoding'; X-Git-Tag: flim-1_8_1~19 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f3504543849ff72022a8b8ce1d589a3e986b5fe;p=elisp%2Fflim.git (mime-entity-encoding): Add new optional argument `default-encoding'; set default encoding if Content-Transfer-Encoding field is not found. --- diff --git a/mime.el b/mime.el index 9672dd8..7961592 100644 --- a/mime.el +++ b/mime.el @@ -215,14 +215,15 @@ ENTITY is used." entity disposition) disposition)))))) -(defun mime-entity-encoding (entity) +(defun mime-entity-encoding (entity &optional default-encoding) (or (mime-entity-encoding-internal entity) - (let ((ret (mime-fetch-field 'Content-Transfer-Encoding entity))) - (if ret - (let ((encoding (mime-parse-Content-Transfer-Encoding ret))) - (when encoding - (mime-entity-set-encoding-internal entity encoding) - encoding)))))) + (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))) (defun mime-read-field (field-name &optional entity) (or (symbolp field-name)