* cosmetics / minor

This commit is contained in:
djcb
2012-10-23 20:29:24 +03:00
parent b467fadc5c
commit bc90df6c53
4 changed files with 11 additions and 9 deletions

View File

@ -296,8 +296,9 @@ SCM_DEFINE (get_contacts, "mu:c:get-contacts", 2, 0, 0,
else if (scm_is_eq (CONTACT_TYPE, SYMB_CONTACT_FROM))
ecdata.ctype = MU_MSG_CONTACT_TYPE_FROM;
else
/* FIXME: raise error */
g_return_val_if_reached (SCM_UNDEFINED);
return mu_guile_error (FUNC_NAME, 0,
"invalid contact type",
SCM_UNDEFINED);
}
ecdata.lst = SCM_EOL;

View File

@ -60,7 +60,6 @@
mu:contact->string
;;
mu:for-each-contact
;;
mu:contacts
;;
@ -180,9 +179,11 @@ store. MAXRESULTS specifies the maximum of messages to return, or
(define-method (mu:contacts (msg <mu:message>) contact-type)
"Get all contacts for MSG of the given CONTACT-TYPE. MSG is of type <mu-message>,
while contact type is either `mu:to', `mu:cc', `mu:from' or `mu:bcc'
to get the corresponding type of contacts, or #t to get all. Returns a
list of <mu-contact> objects."
while contact type is either `mu:contact:to', `mu:contact:cc',
`mu:contact:from' or `mu:contact:bcc' to get the corresponding type of
contacts, or #t to get all.
Returns a list of <mu-contact> objects."
(map (lambda (pair) ;; a pair (na . addr)
(make <mu:contact> #:name (car pair) #:email (cdr pair)))
(mu:c:get-contacts (slot-ref msg 'msg) contact-type)))