(mime-write-entity-body): New function.
authormorioka <morioka>
Sun, 28 Jun 1998 23:43:38 +0000 (23:43 +0000)
committermorioka <morioka>
Sun, 28 Jun 1998 23:43:38 +0000 (23:43 +0000)
mime.el

diff --git a/mime.el b/mime.el
index e6a6181..37eaf70 100644 (file)
--- a/mime.el
+++ b/mime.el
@@ -403,6 +403,17 @@ ENTITY is used."
                              (mime-entity-point-max entity) filename)
       )))
 
+(defun mime-write-entity-body (entity filename)
+  "Write body of ENTITY into FILENAME."
+  (save-excursion
+    (set-buffer (mime-entity-buffer entity))
+    (if (mime-entity-cooked-p entity)
+       (write-region (mime-entity-body-start entity)
+                     (mime-entity-body-end entity) filename)
+      (write-region-as-binary (mime-entity-body-start entity)
+                             (mime-entity-body-end entity) filename)
+      )))
+
 
 ;;; @ end
 ;;;