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

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