'mime-view-plain-text-preview-hook was renamed to
'mime-preview-text/plain-hook.
+*** Variable
+
+ Variable 'mime-view-childrens-header-showing-Content-Type-list was
+abolished. Please use 'mime-preview-condition instead.
+
+*** API about visible-predicates were abolished
+
+ Following functions were abolished:
+
+ mime-view-header-visible-p (entity message-info)
+
+ mime-view-body-visible-p (entity message-info)
+
+ mime-view-entity-separator-visible-p (entity message-info)
+
+Please use 'mime-preview-condition instead.
+
+ Function 'mime-view-entity-button-visible-p is not abolished, but it
+is obsoleted.
+
+*** mime-preview-condition
+
+ Following are added as pre-defined keys:
+
+ 'childrens-situation default preview-situation for children
+ 'message-button to specify to display message-button
+ nil: default (invisible)
+ 'visible: visible
+ 'invisible: invisible
+ 'entity-button to specify to display entity-button
+ nil: default (visible)
+ 'visible: visible
+ 'invisible: invisible
+ 'header to specify to display header
+ nil: default (invisible)
+ 'visible: visible
+ 'invisible: invisible
** API
;;; @@@ predicate function
;;;
-(defvar mime-view-childrens-header-showing-Content-Type-list
- '("message/rfc822" "message/news"))
-
-(defun mime-view-header-visible-p (entity message-info)
- "Return non-nil if header of ENTITY is visible."
- (let ((entity-node-id (mime-entity-node-id entity)))
- (member (mime-entity-type/subtype
- (mime-raw-find-entity-from-node-id
- (cdr entity-node-id) message-info))
- mime-view-childrens-header-showing-Content-Type-list)
- ))
+;; (defvar mime-view-childrens-header-showing-Content-Type-list
+;; '("message/rfc822" "message/news"))
+
+;; (defun mime-view-header-visible-p (entity message-info)
+;; "Return non-nil if header of ENTITY is visible."
+;; (let ((entity-node-id (mime-entity-node-id entity)))
+;; (member (mime-entity-type/subtype
+;; (mime-raw-find-entity-from-node-id
+;; (cdr entity-node-id) message-info))
+;; mime-view-childrens-header-showing-Content-Type-list)
+;; ))
;;; @@@ entity header filter
;;;
(body . visible)))
(ctree-set-calist-strictly
- 'mime-preview-condition '((type . message)(subtype . rfc822)
- (childrens-situation (header . visible))))
-
-(ctree-set-calist-strictly
- 'mime-preview-condition '((type . message)(subtype . news)
- (childrens-situation (header . visible))))
-
-(ctree-set-calist-strictly
'mime-preview-condition '((body . visible)
(body-presentation-method . with-filter)
(body-filter . mime-preview-filter-for-text/plain)))
(body-presentation-method
. mime-view-insert-message/partial-button)))
+(ctree-set-calist-strictly
+ 'mime-preview-condition '((type . message)(subtype . rfc822)
+ (body-presentation-method . nil)
+ (childrens-situation (header . visible)
+ (entity-button . invisible))))
+
+(ctree-set-calist-strictly
+ 'mime-preview-condition '((type . message)(subtype . news)
+ (body-presentation-method . nil)
+ (childrens-situation (header . visible)
+ (entity-button . invisible))))
+
;;; @@@ entity filter
;;;
(cdr (assq 'message-button situation)))
(body-presentation-method
(cdr (assq 'body-presentation-method situation))))
- (when message-button
+ (when (eq message-button 'visible)
(goto-char (point-max))
(mime-view-insert-entity-button message-info message-info subj)
)
(eword-decode-string
(mime-raw-get-subject params encoding)))
)
- (set-buffer obuf)
- (setq nb (point))
- (narrow-to-region nb nb)
- (if (mime-view-entity-button-visible-p entity message-info)
- (mime-view-insert-entity-button entity message-info subj)
- )
(let* ((situation
(ctree-match-calist mime-preview-condition
(list* (cons 'type media-type)
(cons 'major-mode major-mode)
(append params
default-situation))))
+ (button-is-invisible
+ (eq (cdr (assq 'entity-button situation)) 'invisible))
(header-is-visible
- (cdr (assq 'header situation)))
+ (eq (cdr (assq 'header situation)) 'visible))
(body-presentation-method
(cdr (assq 'body-presentation-method situation))))
+ (set-buffer obuf)
+ (setq nb (point))
+ (narrow-to-region nb nb)
+ (or button-is-invisible
+ (if (mime-view-entity-button-visible-p entity message-info)
+ (mime-view-insert-entity-button entity message-info subj)
+ ))
(if header-is-visible
(save-restriction
(narrow-to-region (point)(point))
(erase-buffer)
(insert-buffer-substring the-buf p-beg p-end)
(goto-char (point-min))
- (if (mime-view-header-visible-p entity message-info)
- (delete-region (goto-char (point-min))
- (if (re-search-forward "^$" nil t)
- (match-end 0)
- (point-min)))
- )
- (goto-char (point-min))
- (insert "\n")
+ ;; (if (mime-view-header-visible-p entity message-info)
+ ;; (delete-region (goto-char (point-min))
+ ;; (if (re-search-forward "^$" nil t)
+ ;; (match-end 0)
+ ;; (point-min)))
+ ;; )
+ ;;(goto-char (point-min))
+ ;;(insert "\n")
(goto-char (point-min))
(let ((entity-node-id (mime-entity-node-id entity)) ci str)
(while (progn