From: Pietro Cerutti Date: Fri, 20 Jan 2017 09:31:49 +0000 (+0000) Subject: Add option for missing subject replacement X-Git-Tag: neomutt-20170128~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f1042852a0362a55f34ff7c5846edb0246e7480;p=neomutt Add option for missing subject replacement If you replied to an email which had no subject, then mutt defaulted to the hard-coded string "Re: your mail". This has been replaced by a config variable '$empty_subject' Closes #299 --- diff --git a/globals.h b/globals.h index cf9b6d501..4bd58852a 100644 --- a/globals.h +++ b/globals.h @@ -50,6 +50,7 @@ WHERE char *DisplayFilter; WHERE char *DsnNotify; WHERE char *DsnReturn; WHERE char *Editor; +WHERE char *EmptySubject; WHERE char *EscChar; WHERE char *FolderFormat; WHERE char *ForwFmt; diff --git a/init.h b/init.h index 495da23ed..6dafd0d09 100644 --- a/init.h +++ b/init.h @@ -803,6 +803,12 @@ struct option_t MuttVars[] = { ** .pp ** where \fIstring\fP is the expansion of \fC$$editor\fP described above. */ + { "empty_subject", DT_STR, R_NONE, UL &EmptySubject, UL "Re: your mail" }, + /* + ** .pp + ** This varaible specifies the subject to be used when replying to an email + ** with an empty subject. It defaults to "Re: your mail". + */ { "encode_from", DT_BOOL, R_NONE, OPTENCODEFROM, 0 }, /* ** .pp diff --git a/send.c b/send.c index aa98a438e..b76a65338 100644 --- a/send.c +++ b/send.c @@ -683,7 +683,7 @@ void mutt_make_misc_reply_headers (ENVELOPE *env, CONTEXT *ctx, sprintf (env->subject, "Re: %s", curenv->real_subj); /* __SPRINTF_CHECKED__ */ } else if (!env->subject) - env->subject = safe_strdup ("Re: your mail"); + env->subject = safe_strdup (EmptySubject); } void mutt_add_to_reference_headers (ENVELOPE *env, ENVELOPE *curenv, LIST ***pp, LIST ***qq)