(mime-calist::field-match-method-ignore-case):
authorhmurata <hmurata>
Fri, 23 Jun 2006 12:41:21 +0000 (12:41 +0000)
committerhmurata <hmurata>
Fri, 23 Jun 2006 12:41:21 +0000 (12:41 +0000)
New function; set up for `field-match-method' of calist.

ChangeLog
mime-view.el

index 464a399..bbdb4d4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-23  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * mime-view.el (mime-calist::field-match-method-ignore-case):
+       New function; set up for `field-match-method' of calist.
+
 2006-03-28  Daiki Ueno  <ueno@unixuser.org>
 
        * mime-edit.el (mime-edit-sign-pgp-mime): Set pgg-text-mode.
index 9a2fee4..05222ac 100644 (file)
@@ -665,6 +665,19 @@ Each elements are regexp of field-name.")
 (define-calist-field-match-method
   'body #'mime-calist::field-match-method-as-default-rule)
 
+(defun mime-calist::field-match-method-ignore-case (calist
+                                                   field-type field-value)
+  (let ((s-field (assoc field-type calist)))
+    (cond ((null s-field)
+          (cons (cons field-type field-value) calist))
+         ((eq field-value t)
+          calist)
+         ((string= (downcase (cdr s-field)) (downcase field-value))
+          calist))))
+
+(define-calist-field-match-method
+  'access-type #'calist-field-match-method-ignore-case)
+
 
 (defvar mime-preview-condition nil
   "Condition-tree about how to display entity.")