From 12c76f47c81ec477c415cc314c761042199fe4dd Mon Sep 17 00:00:00 2001 From: morioka Date: Fri, 19 Jun 1998 19:18:00 +0000 Subject: [PATCH] (mime-bbdb/update-record): Use `mime-entity-fetch-field' and `mime-entity-read-field'. --- mime-bbdb.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/mime-bbdb.el b/mime-bbdb.el index 002942a..23d4fb3 100644 --- a/mime-bbdb.el +++ b/mime-bbdb.el @@ -160,17 +160,20 @@ the user confirms the creation." (set-buffer mime-preview-buffer)) (if bbdb-use-pop-up (mime-bbdb/pop-up-bbdb-buffer offer-to-create) - (let* ((from (std11-field-body "From")) - (addr (if from - (car (cdr (mail-extract-address-components from)))))) - (if (or (null from) - (null addr) - (string-match (bbdb-user-mail-names) addr)) - (setq from (or (std11-field-body "To") from)) + (let* ((message (get-text-property (point-min) 'mime-view-entity)) + (from (mime-entity-fetch-field message 'From)) + addr) + (if (or (null from) + (null + (setq addr (car (mime-entity-read-field message 'From)))) + (string-match (bbdb-user-mail-names) + (std11-address-string addr))) + (setq from (or (mime-entity-fetch-field message 'To) + from)) ) (if from (bbdb-annotate-message-sender - from t + (eword-decode-structured-field-body from) t (or (bbdb-invoke-hook-for-value mime-bbdb/auto-create-p) offer-to-create) offer-to-create)) -- 1.7.10.4