From 1b6a6b866db12d3fcf9328cee0cb762398c498b7 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 30 Sep 1998 13:05:26 +0000 Subject: [PATCH] (mime-fetch-field): Refer internal slots for Date, Message-Id and References fields. --- mime.el | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/mime.el b/mime.el index bc38dae..84e7b41 100644 --- a/mime.el +++ b/mime.el @@ -190,17 +190,34 @@ If MESSAGE is specified, it is regarded as root entity." (setq field-name (intern (capitalize (capitalize field-name))))) (or entity (setq entity mime-message-structure)) - (let* ((header (mime-entity-original-header-internal entity)) - (field-body (cdr (assq field-name header)))) - (or field-body - (progn - (if (setq field-body - (mime-entity-send entity 'fetch-field - (symbol-name field-name))) - (mime-entity-set-original-header-internal - entity (put-alist field-name field-body header)) - ) - field-body)))) + (cond ((eq field-name 'Date) + (or (mime-entity-date-internal entity) + (mime-entity-set-date-internal + entity (mime-entity-send entity 'fetch-field "Date")) + )) + ((eq field-name 'Message-Id) + (or (mime-entity-message-id-internal entity) + (mime-entity-set-message-id-internal + entity (mime-entity-send entity 'fetch-field "Message-Id")) + )) + ((eq field-name 'References) + (or (mime-entity-references-internal entity) + (mime-entity-set-references-internal + entity (mime-entity-send entity 'fetch-field "References")) + )) + (t + (let* ((header (mime-entity-original-header-internal entity)) + (field-body (cdr (assq field-name header)))) + (or field-body + (progn + (if (setq field-body + (mime-entity-send entity 'fetch-field + (symbol-name field-name))) + (mime-entity-set-original-header-internal + entity (put-alist field-name field-body header)) + ) + field-body)) + )))) (defalias 'mime-entity-content-type 'mime-entity-content-type-internal) -- 1.7.10.4