From c87150f5f777cf564bb3ed9f702d1e27802ad95c Mon Sep 17 00:00:00 2001 From: morioka Date: Thu, 28 May 1998 21:43:43 +0000 Subject: [PATCH] (mime-preview-text/plain): New function; abolish 'mime-preview-filter-for-text/plain. --- mime-text.el | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/mime-text.el b/mime-text.el index 6a22fbd..e8a0048 100644 --- a/mime-text.el +++ b/mime-text.el @@ -132,15 +132,20 @@ local variable `mime-text-decoder' and variable ;;; @ content filters for mime-text ;;; -(defun mime-preview-filter-for-text/plain (situation) - (mime-text-decode-body situation) - (goto-char (point-max)) - (if (not (eq (char-after (1- (point))) ?\n)) - (insert "\n") - ) - (mime-text-add-url-buttons) - (run-hooks 'mime-preview-text/plain-hook) - ) +(defun mime-preview-text/plain (entity situation) + (save-restriction + (narrow-to-region (point-max)(point-max)) + (insert-buffer-substring mime-raw-buffer + (mime-entity-body-start entity) + (mime-entity-body-end entity)) + (mime-text-decode-body situation) + (goto-char (point-max)) + (if (not (eq (char-after (1- (point))) ?\n)) + (insert "\n") + ) + (mime-text-add-url-buttons) + (run-hooks 'mime-preview-text/plain-hook) + )) (defun mime-preview-filter-for-text/richtext (situation) (let ((beg (point-min))) -- 1.7.10.4