From 2783ff893a3e75b2eec447d92707461d2899b0ee Mon Sep 17 00:00:00 2001 From: djcb Date: Tue, 13 Dec 2011 07:47:02 +0200 Subject: [PATCH] * mu-msg-guile: make mu:msg:from return a list (like to,cc,bcc), fix mu:msg:header --- src/guile/mu-guile-msg.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/guile/mu-guile-msg.c b/src/guile/mu-guile-msg.c index 0065c0d2..7a961f47 100644 --- a/src/guile/mu-guile-msg.c +++ b/src/guile/mu-guile-msg.c @@ -248,17 +248,6 @@ SCM_DEFINE_PUBLIC (msg_subject, "mu:msg:subject", 1, 0, 0, } #undef FUNC_NAME - -SCM_DEFINE_PUBLIC (msg_from, "mu:msg:from", 1, 0, 0, - (SCM MSG), "Get the sender of MSG.\n") -#define FUNC_NAME s_msg_from -{ - SCM_ASSERT (mu_guile_scm_is_msg(MSG), MSG, SCM_ARG1, FUNC_NAME); - - return msg_str_field (MSG, MU_MSG_FIELD_ID_FROM); -} -#undef FUNC_NAME - struct _EachContactData { SCM lst; MuMsgContactType ctype; @@ -308,6 +297,18 @@ contact_list_field (SCM msg_smob, MuMsgFieldId mfid) } +SCM_DEFINE_PUBLIC (msg_from, "mu:msg:from", 1, 0, 0, + (SCM MSG), "Get the list of senders of MSG.\n") +#define FUNC_NAME s_msg_from +{ + SCM_ASSERT (mu_guile_scm_is_msg(MSG), MSG, SCM_ARG1, FUNC_NAME); + + return contact_list_field (MSG, MU_MSG_FIELD_ID_FROM); +} +#undef FUNC_NAME + + + SCM_DEFINE_PUBLIC (msg_to, "mu:msg:to", 1, 0, 0, (SCM MSG), "Get the list of To:-recipients of MSG.\n") #define FUNC_NAME s_msg_to @@ -398,7 +399,7 @@ SCM_DEFINE_PUBLIC (msg_body, "mu:msg:body", 1, 1, 0, #undef FUNC_NAME -SCM_DEFINE_PUBLIC (msg_header, "mu:msg:header", 1, 1, 0, +SCM_DEFINE_PUBLIC (msg_header, "mu:msg:header", 2, 0, 0, (SCM MSG, SCM HEADER), "Get an arbitary HEADER from MSG.\n") #define FUNC_NAME s_msg_header {