From 86c445e400da31939e118eb48d0acbee5b3ec9af Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 24 Jan 1999 14:15:25 +0000 Subject: [PATCH] (insert-entity-content): New method. --- mmbuffer.el | 7 +++++++ mmgeneric.el | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/mmbuffer.el b/mmbuffer.el index 7d39adc..38432fb 100644 --- a/mmbuffer.el +++ b/mmbuffer.el @@ -86,6 +86,13 @@ (mime-entity-body-end-internal entity)) (mime-entity-encoding entity)))) +(mm-define-method insert-entity-content ((entity buffer)) + (insert (with-current-buffer (mime-entity-buffer-internal entity) + (mime-decode-string + (buffer-substring (mime-entity-body-start-internal entity) + (mime-entity-body-end-internal entity)) + (mime-entity-encoding entity))))) + (mm-define-method write-entity-content ((entity buffer) filename) (save-excursion (set-buffer (mime-entity-buffer-internal entity)) diff --git a/mmgeneric.el b/mmgeneric.el index a5a7244..df11185 100644 --- a/mmgeneric.el +++ b/mmgeneric.el @@ -100,6 +100,13 @@ (mime-entity-body-end-internal entity)) (mime-entity-encoding entity)))) +(mm-define-method insert-entity-content ((entity generic)) + (insert (with-current-buffer (mime-entity-buffer entity) + (mime-decode-string + (buffer-substring (mime-entity-body-start-internal entity) + (mime-entity-body-end-internal entity)) + (mime-entity-encoding entity))))) + (mm-define-method write-entity-content ((entity generic) filename) (save-excursion (set-buffer (mime-entity-buffer entity)) -- 1.7.10.4