From 6962086be477f8c1ce01aa814297cd503f2f9437 Mon Sep 17 00:00:00 2001 From: morioka Date: Tue, 30 Jun 1998 12:18:34 +0000 Subject: [PATCH] (mmcooked-entity-content): New alias for `mmbuffer-entity-content'. (mmcooked-write-entity-content): New function. --- mmcooked.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mmcooked.el b/mmcooked.el index 8d4e0df..ad3653a 100644 --- a/mmcooked.el +++ b/mmcooked.el @@ -36,6 +36,20 @@ (defun mmcooked-cooked-p () t) +(defalias 'mmcooked-entity-content 'mmbuffer-entity-content) + +(defun mmcooked-write-entity-content (entity filename) + (save-excursion + (set-buffer (mime-entity-buffer-internal entity)) + (let ((encoding (or (mime-entity-encoding entity) "7bit"))) + (if (member encoding '("7bit" "8bit" "binary")) + (write-region (mime-entity-body-start-internal entity) + (mime-entity-body-end-internal entity) filename) + (mime-write-decoded-region (mime-entity-body-start-internal entity) + (mime-entity-body-end-internal entity) + filename encoding) + )))) + ;;; @ end ;;; -- 1.7.10.4