From 858a8a0eb594087dd67f6426190dd34956e1b527 Mon Sep 17 00:00:00 2001 From: Robert Fenk Date: Tue, 29 Jan 2002 09:38:26 +0000 Subject: (bbdb/sc-consult-attr): Fixed to really use recipient when logged in user sent this. --- lisp/bbdb-sc.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'lisp/bbdb-sc.el') diff --git a/lisp/bbdb-sc.el b/lisp/bbdb-sc.el index 1a52e5c..f9c158e 100644 --- a/lisp/bbdb-sc.el +++ b/lisp/bbdb-sc.el @@ -102,15 +102,16 @@ used to compare against citation selected by the user." (defun bbdb/sc-consult-attr (from) "Extract citing information from BBDB using sc-consult where FROM is user e-mail address to look for in BBDB." - ;; if logged in user sent this, use recipients. - (let ((check (if (or (null from) - (string-match (bbdb-user-mail-names) from)) - (car (cdr (mail-extract-address-components - (or (sc-mail-field "to") from)))) - from))) - (if from - (let ((record (bbdb-search-simple nil from))) - (and record (bbdb-record-getprop record bbdb/sc-attribution-field)))))) + ;; if logged in user sent this, use recipients. + (let ((from (if (or (null from) + (string-match (bbdb-user-mail-names) from)) + (car (cdr (mail-extract-address-components + (or (sc-mail-field "to") from)))) + from))) + (if from + (let ((record (bbdb-search-simple nil from))) + (and record + (bbdb-record-getprop record bbdb/sc-attribution-field)))))) (defun bbdb/sc-set-attr () "Add attribute to BBDB." -- cgit v1.2.3