From f9364e3a29a9a2f5190827a688817c157b90f413 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 24 Jun 1998 12:03:58 +0000 Subject: [PATCH] (mime-parse-encapsulated): New function. (mime-parse-message): Use `mime-parse-encapsulated'. --- mime-parse.el | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/mime-parse.el b/mime-parse.el index e7c356b..87df395 100644 --- a/mime-parse.el +++ b/mime-parse.el @@ -197,6 +197,17 @@ If is is not found, return DEFAULT-ENCODING." (mime-entity-set-children entity (nreverse children)) entity)) +(defun mime-parse-encapsulated (entity) + (mime-entity-set-children + entity + (save-restriction + (narrow-to-region (mime-entity-body-start entity) + (mime-entity-body-end entity)) + (list (mime-parse-message + nil nil (cons 0 (mime-entity-node-id entity)))) + )) + entity) + ;;;###autoload (defun mime-parse-message (&optional default-ctl default-encoding node-id) "Parse current-buffer as a MIME message. @@ -249,14 +260,9 @@ mime-{parse|read}-Content-Type." (memq (mime-content-type-subtype content-type) '(rfc822 news external-body) )) - (mime-entity-set-children entity - (save-restriction - (narrow-to-region body-start body-end) - (list (mime-parse-message - nil nil (cons 0 node-id))) - )) - )) - entity)) + (mime-parse-encapsulated entity) + ) + (t entity)))) ;;; @ for buffer -- 1.7.10.4