From: morioka Date: Sun, 22 Mar 1998 09:14:08 +0000 (+0000) Subject: (mime-view-filter-for-text/plain): Change interface. X-Git-Tag: semi-1_1_2~13 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c69bbe430c495bde8a6639f8503afbe2790bd7e1;p=elisp%2Fsemi.git (mime-view-filter-for-text/plain): Change interface. (mime-view-filter-for-text/richtext): Change interface. (mime-view-filter-for-text/enriched): Change interface. --- diff --git a/mime-text.el b/mime-text.el index 63e859a..04a46f2 100644 --- a/mime-text.el +++ b/mime-text.el @@ -111,8 +111,9 @@ variable `mime-text-decoder' and variable `mime-text-decoder-alist'." ;;; @ content filters for mime-text ;;; -(defun mime-view-filter-for-text/plain (ctype params encoding) - (mime-decode-text-body (cdr (assoc "charset" params)) encoding) +(defun mime-view-filter-for-text/plain (situation) + (mime-decode-text-body (cdr (assoc "charset" situation)) + (cdr (assq 'encoding situation))) (goto-char (point-max)) (if (not (eq (char-after (1- (point))) ?\n)) (insert "\n") @@ -130,21 +131,19 @@ variable `mime-text-decoder' and variable `mime-text-decoder-alist'." (run-hooks 'mime-view-plain-text-preview-hook) ) -(defun mime-view-filter-for-text/richtext (ctype params encoding) - (let* ((charset (cdr (assoc "charset" params))) - (beg (point-min)) - ) +(defun mime-view-filter-for-text/richtext (situation) + (let* ((beg (point-min))) (remove-text-properties beg (point-max) '(face nil)) - (mime-decode-text-body charset encoding) + (mime-decode-text-body (cdr (assoc "charset" situation)) + (cdr (assq 'encoding situation))) (richtext-decode beg (point-max)) )) -(defun mime-view-filter-for-text/enriched (ctype params encoding) - (let* ((charset (cdr (assoc "charset" params))) - (beg (point-min)) - ) +(defun mime-view-filter-for-text/enriched (situation) + (let* ((beg (point-min))) (remove-text-properties beg (point-max) '(face nil)) - (mime-decode-text-body charset encoding) + (mime-decode-text-body (cdr (assoc "charset" situation)) + (cdr (assq 'encoding situation))) (enriched-decode beg (point-max)) ))