* wl-vars.el (wl-message-ignored-field-list): New variable.
authorueno <ueno>
Tue, 29 Aug 2000 05:11:24 +0000 (05:11 +0000)
committerueno <ueno>
Tue, 29 Aug 2000 05:11:24 +0000 (05:11 +0000)
(wl-message-visible-field-list): New variable.

* wl-mime.el (wl-mime-header-presentation-method): New function.
(wl-mime-setup): Set header-presentation-method.

wl/ChangeLog
wl/wl-mime.el
wl/wl-vars.el

index bf5cca4..0621155 100644 (file)
@@ -1,3 +1,11 @@
+2000-08-29   Daiki Ueno  <ueno@unixuser.org>
+
+       * wl-vars.el (wl-message-ignored-field-list): New variable.
+       (wl-message-visible-field-list): New variable.
+
+       * wl-mime.el (wl-mime-header-presentation-method): New function.
+       (wl-mime-setup): Set header-presentation-method.
+
 2000-08-28   Daiki Ueno  <ueno@unixuser.org>
 
        * wl-nemacs.el (wl-draft-overload-functions): Set
index 608e639..57a54bb 100644 (file)
@@ -322,6 +322,13 @@ automatically."
          (setq overviews (cdr overviews)))
        (message "Not all partials found.")))))
 
+(defun wl-mime-header-presentation-method (entity situation)
+  (let ((mmelmo-sort-field-list wl-message-sort-field-list))
+    (mime-insert-header entity
+                       wl-message-ignored-field-list
+                       wl-message-visible-field-list)
+    (wl-highlight-headers)))
+
 ;;; Setup methods.
 (defun wl-mime-setup ()
   (set-alist 'mime-preview-quitting-method-alist
@@ -364,8 +371,15 @@ automatically."
   (set-alist 'mime-raw-representation-type-alist
             'mmelmo-original-mode 'binary)
   ;; Sort and highlight header fields.
-  (setq mmelmo-sort-field-list wl-message-sort-field-list)
-  (add-hook 'mmelmo-header-inserted-hook 'wl-highlight-headers)
+  (or wl-message-ignored-field-list
+      (setq wl-message-ignored-field-list
+           mime-view-ignored-field-list))
+  (or wl-message-visible-field-list
+      (setq wl-message-visible-field-list
+           mime-view-visible-field-list))
+  (set-alist 'mime-header-presentation-method-alist
+            'mmelmo-original-mode
+            (function wl-mime-header-presentation-method))
   (add-hook 'mmelmo-entity-content-inserted-hook 'wl-highlight-body))
   
 
index bc91816..66c4bbf 100644 (file)
@@ -1045,6 +1045,18 @@ Set this if (system-name) does not return FQDN."
   :type '(repeat (string :tag "Field Regexp"))
   :group 'wl-pref)
 
+(defcustom wl-message-ignored-field-list nil
+  "All fields that match this list will be hidden in message buffer.
+Each elements are regexp of field-name."
+  :type '(repeat (string :tag "Field Regexp"))
+  :group 'wl-pref)
+
+(defcustom wl-message-visible-field-list nil
+  "All fields that match this list will be displayed in message buffer.
+Each elements are regexp of field-name."
+  :type '(repeat (string :tag "Field Regexp"))
+  :group 'wl-pref)
+
 (defcustom wl-folder-window-width 20
   "*Width of folder window."
   :type 'integer