From: morioka Date: Sun, 15 Mar 1998 11:27:19 +0000 (+0000) Subject: (mime-type/subtype-string): New function. X-Git-Tag: semi-1_1_0~17 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f6038627387095d75cfe62494df68ec663afed42;p=elisp%2Fsemi.git (mime-type/subtype-string): New function. (mime-entity-type/subtype): Use `mime-type/subtype-string'. --- diff --git a/mime-parse.el b/mime-parse.el index a7f3c05..f63752a 100644 --- a/mime-parse.el +++ b/mime-parse.el @@ -171,13 +171,16 @@ and return parsed it. [mime-parse.el]" (defsubst mime-entity-encoding (entity-info) (aref entity-info 6)) (defsubst mime-entity-children (entity-info) (aref entity-info 7)) +(defsubst mime-type/subtype-string (type &optional subtype) + "Return type/subtype string from TYPE and SUBTYPE." + (if type + (if subtype + (format "%s/%s" type subtype) + (format "%s" type)))) + (defsubst mime-entity-type/subtype (entity-info) - (let ((type (mime-entity-media-type entity-info))) - (if type - (let ((subtype (mime-entity-media-subtype entity-info))) - (if subtype - (format "%s/%s" type subtype) - (symbol-name type)))))) + (mime-type/subtype-string (mime-entity-media-type entity-info) + (mime-entity-media-subtype entity-info))) (defun mime-parse-multipart (boundary primtype subtype params encoding rcnum) (goto-char (point-min))