Index: PATCHES =================================================================== RCS file: /home/roessler/cvs/mutt/PATCHES,v retrieving revision 3.6 diff -u -r3.6 PATCHES --- PATCHES 9 Dec 2002 17:44:54 -0000 3.6 +++ PATCHES 19 Jul 2005 19:53:11 -0000 @@ -0,0 +1 @@ +patch-1.5.9.aw.listreply.1 Index: init.h =================================================================== RCS file: /home/roessler/cvs/mutt/init.h,v retrieving revision 3.72 diff -u -r3.72 init.h --- init.h 28 Jun 2005 19:26:54 -0000 3.72 +++ init.h 19 Jul 2005 19:53:11 -0000 @@ -1017,6 +1017,13 @@ ** The locale used by \fIstrftime(3)\fP to format dates. Legal values are ** the strings your system accepts for the locale variable \fILC_TIME\fP. */ + { "list_reply", DT_QUAD, R_NONE, OPT_LISTREPLY, M_NO }, + /* + ** .pp + ** When set, address replies to the mailing list the original message came + ** from (instead to the author only). Setting this option to ``ask-yes'' or + ** ``ask-no'' will ask if you really intended to reply to the author only. + */ { "mail_check", DT_NUM, R_NONE, UL &BuffyTimeout, 5 }, /* ** .pp Index: mutt.h =================================================================== RCS file: /home/roessler/cvs/mutt/mutt.h,v retrieving revision 3.42 diff -u -r3.42 mutt.h --- mutt.h 12 Jun 2005 18:24:31 -0000 3.42 +++ mutt.h 19 Jul 2005 19:53:11 -0000 @@ -294,6 +294,7 @@ #endif OPT_SUBJECT, OPT_VERIFYSIG, /* verify PGP signatures */ + OPT_LISTREPLY, /* THIS MUST BE THE LAST VALUE. */ OPT_MAX Index: send.c =================================================================== RCS file: /home/roessler/cvs/mutt/send.c,v retrieving revision 3.37 diff -u -r3.37 send.c --- send.c 3 Feb 2005 17:01:44 -0000 3.37 +++ send.c 19 Jul 2005 19:53:11 -0000 @@ -440,6 +440,7 @@ static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto) { char prompt[STRING]; + ADDRESS *tmp; if (flags && env->mail_followup_to && hmfupto == M_YES) { @@ -453,6 +454,23 @@ if (flags & SENDLISTREPLY) return 0; + /* If this message came from a mailing list, ask the user if he really + * intended to reply to the author only. + */ + if (!(flags & SENDGROUPREPLY) && mutt_is_list_cc (0, env->to, env->cc)) { + switch (query_quadoption (OPT_LISTREPLY, + _("Message came from a mailing list. Reply to author only?"))) + { + case M_NO: + tmp = find_mailing_lists (env->to, env->cc); + rfc822_append (to, tmp); + rfc822_free_address (&tmp); + return 0; + case -1: + return -1; /* abort */ + } + } + if (!option(OPTREPLYSELF) && mutt_addr_is_user (env->from)) { /* mail is from the user, assume replying to recipients */