;; Created: 1994/7/13
;; Renamed: 1994/8/31 from tm-body.el
;; Renamed: 1997/02/19 from tm-view.el
-;; Version: $Revision: 0.111 $
+;; Version: $Revision: 0.112 $
;; 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.111 1997-09-05 16:07:25 morioka Exp $")
+ "$Id: mime-view.el,v 0.112 1997-09-05 16:56:00 morioka Exp $")
(defconst mime-view-version
`,(get-version-string mime-view-RCS-ID))
;;; @@ entity button
;;;
-(defun mime-view-insert-entity-button (rcnum cinfo ctype params subj encoding)
+(defun mime-view-insert-entity-button (rcnum cinfo
+ media-type media-subtype params
+ subj encoding)
"Insert entity-button."
(mime-insert-button
(let ((access-type (assoc "access-type" params))
(concat
num " " subj
(let ((rest
- (concat " <" ctype
+ (format " <%s/%s%s%s>"
+ media-type media-subtype
(if charset
(concat "; " charset)
- (if encoding (concat " (" encoding ")"))
- )
- ">")))
+ "")
+ (if encoding
+ (concat " (" encoding ")")
+ ""))))
(if (>= (+ (current-column)(length rest))(window-width))
"\n\t")
rest)))
(function mime-view-play-current-entity))
)
-(defun mime-view-entity-button-function
- (rcnum cinfo ctype params subj encoding)
+(defun mime-view-entity-button-function (rcnum cinfo
+ media-type media-subtype
+ params subj encoding)
"Insert entity button conditionally.
Please redefine this function if you want to change default setting."
(or (null rcnum)
- (string= ctype "application/x-selection")
- (and (string= ctype "application/octet-stream")
- (let ((entity-info
- (mime-article/rcnum-to-cinfo (cdr rcnum) cinfo)))
- (and (eq (mime-entity-info-media-type entity-info)
- 'multipart)
- (eq (mime-entity-info-media-subtype entity-info)
- 'encrypted)
- )))
- (mime-view-insert-entity-button rcnum cinfo ctype params subj encoding)
+ (and (eq media-type 'application)
+ (or (eq media-subtype 'x-selection)
+ (and (eq media-subtype 'octet-stream)
+ (let ((entity-info
+ (mime-article/rcnum-to-cinfo (cdr rcnum) cinfo)))
+ (and (eq (mime-entity-info-media-type entity-info)
+ 'multipart)
+ (eq (mime-entity-info-media-subtype entity-info)
+ 'encrypted)
+ )))))
+ (mime-view-insert-entity-button
+ rcnum cinfo media-type media-subtype params subj encoding)
))
(set-buffer obuf)
(setq nb (point))
(narrow-to-region nb nb)
- (mime-view-entity-button-function rcnum cinfo ctype params subj encoding)
+ (mime-view-entity-button-function
+ rcnum cinfo media-type media-subtype params subj encoding)
(if (mime-view-header-visible-p rcnum cinfo)
(mime-view-display-header beg he)
)
(save-excursion
(goto-char (point-max))
(mime-view-insert-entity-button
- rcnum cinfo ctype params subj encoding)
+ rcnum cinfo media-type media-subtype params subj encoding)
))
(cond ((mime-view-body-visible-p rcnum cinfo media-type media-subtype)
(mime-view-display-body he end
)
(goto-char (point-max))
(mime-view-insert-entity-button
- rcnum cinfo ctype params subj encoding)
+ rcnum cinfo media-type media-subtype params subj encoding)
))
(mime-view-entity-separator-function
rcnum cinfo media-type media-subtype params subj)