+2001-09-25 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl-mime.el (wl-mime-display-text/plain): New function.
+ (wl-mime-display-header): Ditto.
+ (wl-mime-setup): Register `wl-mime-display-text/plain' as a
+ body-presentation-method for text/plain;
+ Register `wl-mime-display-header' as a header-presentation-method;
+ Don't set up `elmo-message-text-content-inserted-hook' and
+ `elmo-message-header-inserted-hook'.
+
+ * wl-message.el (wl-message-buffer-all-header-flag): New buffer local
+ variable.
+ (wl-message-display-internal): Set `wl-message-buffer-all-header-flag'
+ as t if flag is 'all-header;
+ Don't bind `elmo-message-ignored-field-list',
+ `elmo-message-visible-field-list' and `elmo-message-sorted-field-list'.
+
2001-09-24 Katsumi Yamaoka <yamaoka@jpl.org>
* wl-vars.el: (wl-biff-state-indicator-off): Changed default value
(defvar wl-message-buffer-cur-flag nil)
(defvar wl-message-buffer-cur-summary-buffer nil)
(defvar wl-message-buffer-original-buffer nil) ; original buffer.
+(defvar wl-message-buffer-all-header-flag nil)
(make-variable-buffer-local 'wl-message-buffer-cur-folder)
(make-variable-buffer-local 'wl-message-buffer-cur-number)
(make-variable-buffer-local 'wl-message-buffer-cur-flag)
(make-variable-buffer-local 'wl-message-buffer-cur-summary-buffer)
(make-variable-buffer-local 'wl-message-buffer-original-buffer)
+(make-variable-buffer-local 'wl-message-buffer-all-header-flag)
(defvar wl-fixed-window-configuration nil)
(defun wl-message-display-internal (folder number flag
&optional force-reload unread)
- (let ((elmo-message-ignored-field-list
- (if (eq flag 'all-header)
- nil
- wl-message-ignored-field-list))
- (elmo-message-visible-field-list wl-message-visible-field-list)
- (elmo-message-sorted-field-list wl-message-sort-field-list)
- (elmo-message-fetch-threshold wl-fetch-confirm-threshold))
+ (let ((elmo-message-fetch-threshold wl-fetch-confirm-threshold))
+ (setq wl-message-buffer-all-header-flag (eq flag 'all-header))
(prog1
(if (eq flag 'as-is)
(let (wl-highlight-x-face-function)
(setq overviews (cdr overviews)))
(message "Not all partials found.")))))
+(defun wl-mime-display-text/plain (entity situation)
+ (let ((beg (point)))
+ (mime-display-text/plain entity situation)
+ (wl-highlight-message beg (point-max) t t)))
+
+(defun wl-mime-display-header (entity situation)
+ (let ((elmo-message-ignored-field-list
+ (if wl-message-buffer-all-header-flag
+ nil
+ wl-message-ignored-field-list))
+ (elmo-message-visible-field-list wl-message-visible-field-list)
+ (elmo-message-sorted-field-list wl-message-sort-field-list))
+ (elmo-mime-insert-header entity situation)
+ (wl-highlight-headers)))
+
;;; Setup methods.
(defun wl-mime-setup ()
(set-alist 'mime-preview-quitting-method-alist
(add-hook 'wl-message-exit-hook 'wl-message-delete-mime-out-buf)
(ctree-set-calist-strictly
+ 'mime-preview-condition
+ '((type . text) (subtype . plain)
+ (body . visible)
+ (body-presentation-method . wl-mime-display-text/plain)
+ (major-mode . wl-original-message-mode)))
+
+ (ctree-set-calist-strictly
'mime-acting-condition
'((type . message) (subtype . partial)
(method . wl-mime-combine-message/partial-pieces)
(request-partial-message-method . wl-message-request-partial)
(major-mode . wl-original-message-mode)))
+
(ctree-set-calist-strictly
'mime-acting-condition
'((mode . "extract")
mime-view-visible-field-list))
(set-alist 'mime-header-presentation-method-alist
'wl-original-message-mode
- (function elmo-mime-insert-header))
+ 'wl-mime-display-header)
;; To avoid overriding wl-draft-mode-map.
(when (boundp 'mime-setup-signature-key-alist)
(unless (assq 'wl-draft-mode mime-setup-signature-key-alist)
(setq mime-setup-signature-key-alist
(cons '(wl-draft-mode . "\C-c\C-w")
- mime-setup-signature-key-alist))))
- (add-hook 'elmo-message-text-content-inserted-hook 'wl-highlight-body-all)
- (add-hook 'elmo-message-header-inserted-hook 'wl-highlight-headers))
+ mime-setup-signature-key-alist)))))
(require 'product)
(product-provide (provide 'wl-mime) (require 'wl-version))