From: hmurata Date: Fri, 23 Jun 2006 12:41:21 +0000 (+0000) Subject: (mime-calist::field-match-method-ignore-case): X-Git-Tag: semi-1_14-wl-root~22 X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fsemi.git;a=commitdiff_plain;h=8dcd38a161c8cf5862a8ca53f50e01612010f314 (mime-calist::field-match-method-ignore-case): New function; set up for `field-match-method' of calist. --- diff --git a/ChangeLog b/ChangeLog index 464a399..bbdb4d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-06-23 Hiroya Murata + + * 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 * mime-edit.el (mime-edit-sign-pgp-mime): Set pgg-text-mode. diff --git a/mime-view.el b/mime-view.el index 9a2fee4..05222ac 100644 --- a/mime-view.el +++ b/mime-view.el @@ -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.")