From: morioka Date: Thu, 28 May 1998 21:43:43 +0000 (+0000) Subject: (mime-preview-text/plain): New function; abolish X-Git-Tag: remi-1_4_0_91~14 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c87150f5f777cf564bb3ed9f702d1e27802ad95c;p=elisp%2Fsemi.git (mime-preview-text/plain): New function; abolish 'mime-preview-filter-for-text/plain. --- 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)))