From: morioka Date: Fri, 16 Oct 1998 02:37:53 +0000 (+0000) Subject: Abolish function `mime-text-insert-decoded-body'. X-Git-Tag: semi-1_10_0~37 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9a351f3fd93744f68439cb5b06c4763c3687aed7;p=elisp%2Fsemi.git Abolish function `mime-text-insert-decoded-body'. (mime-display-text/plain): Use `mime-insert-text-content' instead of `mime-text-insert-decoded-body'. (mime-display-text/richtext): Likewise. (mime-display-text/enriched): Likewise. --- diff --git a/mime-text.el b/mime-text.el index 025172d..0bda122 100644 --- a/mime-text.el +++ b/mime-text.el @@ -27,39 +27,14 @@ (require 'mime-view) -;;; @ code conversion -;;; - -(defun mime-text-insert-decoded-body (entity) - "Insert text body of ENTITY in SITUATION. -It decodes MIME-encoding then code-converts as MIME-charset. -MIME-encoding is value of field 'encoding of SITUATION. It must be -'nil or string. MIME-charset is value of field \"charset\" of -SITUATION. It must be symbol." - (let ((str (mime-entity-content entity))) - (insert - (if (and (mime-entity-cooked-p entity) - (member (mime-entity-encoding entity) - '(nil "7bit" "8bit" "binary"))) - str - (decode-mime-charset-string str - (or (mime-content-type-parameter - (mime-entity-content-type entity) - "charset") - default-mime-charset) - 'CRLF) - ))) - (run-hooks 'mime-text-decode-hook) - ) - - ;;; @ content filters for mime-text ;;; (defun mime-display-text/plain (entity situation) (save-restriction (narrow-to-region (point-max)(point-max)) - (mime-text-insert-decoded-body entity) + (mime-insert-text-content entity) + (run-hooks 'mime-text-decode-hook) (goto-char (point-max)) (if (not (eq (char-after (1- (point))) ?\n)) (insert "\n") @@ -71,7 +46,8 @@ SITUATION. It must be symbol." (defun mime-display-text/richtext (entity situation) (save-restriction (narrow-to-region (point-max)(point-max)) - (mime-text-insert-decoded-body entity) + (mime-insert-text-content entity) + (run-hooks 'mime-text-decode-hook) (let ((beg (point-min))) (remove-text-properties beg (point-max) '(face nil)) (richtext-decode beg (point-max)) @@ -80,7 +56,8 @@ SITUATION. It must be symbol." (defun mime-display-text/enriched (entity situation) (save-restriction (narrow-to-region (point-max)(point-max)) - (mime-text-insert-decoded-body entity) + (mime-insert-text-content entity) + (run-hooks 'mime-text-decode-hook) (let ((beg (point-min))) (remove-text-properties beg (point-max) '(face nil)) (enriched-decode beg (point-max))