From f6038627387095d75cfe62494df68ec663afed42 Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 15 Mar 1998 11:27:19 +0000 Subject: [PATCH] (mime-type/subtype-string): New function. (mime-entity-type/subtype): Use `mime-type/subtype-string'. --- mime-parse.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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)) -- 1.7.10.4