changeset: 6560:d11b6776532f user: Kevin McCarthy <ke...@8t8.us> date: Sun Feb 28 19:42:40 2016 -0800 link: http://dev.mutt.org/hg/mutt/rev/d11b6776532f
Draft file tweeks: rename flag, don't auto-abort on no change. Rename the flag to SENDDRAFTFILE since it will be used in contexts other than the body allocation. Don't automatically abort if the message was unchanged; it seems possible the draft files could be used as the entire message reply. diffs (58 lines): diff -r 909cf6dd067c -r d11b6776532f main.c --- a/main.c Mon Feb 15 19:44:23 2016 -0800 +++ b/main.c Sun Feb 28 19:42:40 2016 -0800 @@ -989,7 +989,7 @@ sendflags |= SENDNOFREEHEADER; /* Parse the draftFile into the full HEADER/BODY structure. - * Set SENDUSEHDRBODY so ci_send_message doesn't overwrite + * Set SENDDRAFTFILE so ci_send_message doesn't overwrite * our msg->content. */ if (draftFile) @@ -998,7 +998,7 @@ ENVELOPE *opts_env = msg->env; struct stat st; - sendflags |= SENDUSEHDRBODY; + sendflags |= SENDDRAFTFILE; /* Set up a "context" header with just enough information so that * mutt_prepare_template() can parse the message in fin. diff -r 909cf6dd067c -r d11b6776532f mutt.h --- a/mutt.h Mon Feb 15 19:44:23 2016 -0800 +++ b/mutt.h Sun Feb 28 19:42:40 2016 -0800 @@ -297,7 +297,7 @@ #define SENDRESEND (1<<8) #define SENDPOSTPONEDFCC (1<<9) /* used by mutt_get_postponed() to signal that the x-mutt-fcc header field was present */ #define SENDNOFREEHEADER (1<<10) /* Used by the -E flag */ -#define SENDUSEHDRBODY (1<<11) /* Used by the -H flag */ +#define SENDDRAFTFILE (1<<11) /* Used by the -H flag */ /* flags for mutt_compose_menu() */ #define M_COMPOSE_NOFREEHEADER (1<<0) diff -r 909cf6dd067c -r d11b6776532f send.c --- a/send.c Mon Feb 15 19:44:23 2016 -0800 +++ b/send.c Sun Feb 28 19:42:40 2016 -0800 @@ -1229,10 +1229,10 @@ if (! (flags & (SENDKEY | SENDPOSTPONED | SENDRESEND))) { - /* When SENDUSEHDRBODY is set, the caller has already + /* When SENDDRAFTFILE is set, the caller has already * created the "parent" body structure. */ - if (! (flags & SENDUSEHDRBODY)) + if (! (flags & SENDDRAFTFILE)) { pbody = mutt_new_body (); pbody->next = msg->content; /* don't kill command-line attachments */ @@ -1465,7 +1465,7 @@ mutt_message_hook (NULL, msg, M_SEND2HOOK); } - if (! (flags & (SENDPOSTPONED | SENDFORWARD | SENDKEY | SENDRESEND))) + if (! (flags & (SENDPOSTPONED | SENDFORWARD | SENDKEY | SENDRESEND | SENDDRAFTFILE))) { if (stat (msg->content->filename, &st) == 0) {