From: morioka Date: Wed, 24 Jun 1998 00:33:08 +0000 (+0000) Subject: (mime-fetch-field): New function; abolish `mime-entity-fetch-field'. X-Git-Tag: flim-1_6_0~12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcf6a3308420a2b01585addbd2eceaea2b9a1bb6;p=elisp%2Fflim.git (mime-fetch-field): New function; abolish `mime-entity-fetch-field'. (mime-read-field): New function; abolish `mime-entity-read-field'. --- diff --git a/mime.el b/mime.el index 84872ff..6e34d71 100644 --- a/mime.el +++ b/mime.el @@ -63,9 +63,11 @@ current-buffer, and return it.") ;;; @ MIME entity ;;; -(defun mime-entity-fetch-field (entity field-name) +(defun mime-fetch-field (field-name &optional entity) (or (symbolp field-name) (setq field-name (intern (capitalize (capitalize field-name))))) + (or entity + (setq entity mime-message-structure)) (let* ((header (mime-entity-original-header entity)) (field-body (cdr (assq field-name header)))) (or field-body @@ -83,9 +85,11 @@ current-buffer, and return it.") ) field-body)))) -(defun mime-entity-read-field (entity field-name) +(defun mime-read-field (field-name &optional entity) (or (symbolp field-name) (setq field-name (capitalize (capitalize field-name)))) + (or entity + (setq entity mime-message-structure)) (cond ((eq field-name 'Content-Type) (mime-entity-content-type entity) ) @@ -99,7 +103,7 @@ current-buffer, and return it.") (let* ((header (mime-entity-parsed-header entity)) (field (cdr (assq field-name header)))) (or field - (let ((field-body (mime-entity-fetch-field entity field-name))) + (let ((field-body (mime-fetch-field field-name entity))) (when field-body (cond ((memq field-name '(From Resent-From To Resent-To