;; Created: 1994/7/13
;; Renamed: 1994/8/31 from tm-body.el
;; Renamed: 1997/02/19 from tm-view.el
-;; Version: $Revision: 0.110 $
+;; Version: $Revision: 0.111 $
;; Keywords: MIME, multimedia, mail, news
;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
;;;
(defconst mime-view-RCS-ID
- "$Id: mime-view.el,v 0.110 1997-09-05 12:56:51 morioka Exp $")
+ "$Id: mime-view.el,v 0.111 1997-09-05 16:07:25 morioka Exp $")
(defconst mime-view-version
`,(get-version-string mime-view-RCS-ID))
mime-view-childrens-header-showing-Content-Type-list)
))
-(defun mime-view-body-visible-p (rcnum cinfo &optional ctype)
- (let (ccinfo)
- (or ctype
- (setq ctype
- (mime-entity-info-type/subtype
- (setq ccinfo (mime-article/rcnum-to-cinfo rcnum cinfo))
- ))
- )
+(defun mime-view-body-visible-p (rcnum cinfo media-type media-subtype)
+ (let ((ctype (if media-type
+ (if media-subtype
+ (format "%s/%s" media-type media-subtype)
+ (symbol-name media-type)
+ ))))
(and (member ctype mime-view-visible-media-type-list)
- (if (string-equal ctype "application/octet-stream")
- (progn
- (or ccinfo
- (setq ccinfo (mime-article/rcnum-to-cinfo rcnum cinfo))
- )
+ (if (and (eq media-type 'application)
+ (eq media-subtype 'octet-stream))
+ (let ((ccinfo (mime-article/rcnum-to-cinfo rcnum cinfo)))
(member (mime-entity-info-encoding ccinfo)
'(nil "7bit" "8bit"))
)
;;; @@ entity separator
;;;
-(defun mime-view-entity-separator-function (rcnum cinfo ctype params subj)
+(defun mime-view-entity-separator-function (rcnum cinfo
+ media-type media-subtype
+ params subj)
"Insert entity separator conditionally.
Please redefine this function if you want to change default setting."
(or (mime-view-header-visible-p rcnum cinfo)
- (mime-view-body-visible-p rcnum cinfo ctype)
+ (mime-view-body-visible-p rcnum cinfo media-type media-subtype)
(progn
(goto-char (point-max))
(insert "\n")
(mime-view-insert-entity-button
rcnum cinfo ctype params subj encoding)
))
- (cond ((mime-view-body-visible-p rcnum cinfo ctype)
+ (cond ((mime-view-body-visible-p rcnum cinfo media-type media-subtype)
(mime-view-display-body he end
rcnum cinfo ctype params subj encoding)
)
(mime-view-insert-entity-button
rcnum cinfo ctype params subj encoding)
))
- (mime-view-entity-separator-function rcnum cinfo ctype params subj)
+ (mime-view-entity-separator-function
+ rcnum cinfo media-type media-subtype params subj)
(setq ne (point-max))
(widen)
(put-text-property nb ne 'mime-view-raw-buffer ibuf)