summaryrefslogtreecommitdiff
path: root/lisp/bbdb-sc.el
diff options
context:
space:
mode:
authorRobert Fenk <fenk@users.sourceforge.net>2002-01-29 09:38:26 +0000
committerRobert Fenk <fenk@users.sourceforge.net>2002-01-29 09:38:26 +0000
commit858a8a0eb594087dd67f6426190dd34956e1b527 (patch)
tree1308d66434b90c7d8d2c138981c78265d68da8e7 /lisp/bbdb-sc.el
parenta1384eb5d8c899b9b66ed6757ffb33cb63a78c40 (diff)
(bbdb/sc-consult-attr): Fixed to really use
recipient when logged in user sent this.
Diffstat (limited to 'lisp/bbdb-sc.el')
-rw-r--r--lisp/bbdb-sc.el19
1 files changed, 10 insertions, 9 deletions
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."