From: Thomas Roessler Date: Thu, 2 Mar 2000 09:47:55 +0000 (+0000) Subject: Add $reverse_realname option. Essentially suggested by ws@rhein.de. X-Git-Tag: mutt-1-1-8-rel~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8bdc339d814063238ca3468091e0f17548a11bb3;p=mutt Add $reverse_realname option. Essentially suggested by ws@rhein.de. --- diff --git a/init.h b/init.h index afc4ed16..763a6f72 100644 --- a/init.h +++ b/init.h @@ -1599,6 +1599,14 @@ struct option_t MuttVars[] = { ** messages you are replying to. If the variable is unset, the ** \fIFrom:\fP line will use your address on the current machine. */ + { "reverse_realname", DT_BOOL, R_BOTH, OPTREVREAL, 1 }, + /* + ** .pp + ** This variable fine-tunes the behaviour of the $reverse_name feature. + ** When it is set, mutt will use the address from incoming messages as-is, + ** possibly including eventual real names. When it is unset, mutt will + ** override any such realnames with the setting of the $realname variable. + */ { "rfc2047_parameters", DT_BOOL, R_NONE, OPTRFC2047PARAMS, 0 }, /* ** .pp diff --git a/mutt.h b/mutt.h index 72171b85..8cfff810 100644 --- a/mutt.h +++ b/mutt.h @@ -327,6 +327,7 @@ enum OPTRESOLVE, OPTREVALIAS, OPTREVNAME, + OPTREVREAL, OPTRFC2047PARAMS, OPTSAVEADDRESS, OPTSAVEEMPTY, diff --git a/send.c b/send.c index 9723dc55..b7533ed8 100644 --- a/send.c +++ b/send.c @@ -868,6 +868,8 @@ static ADDRESS *set_reverse_name (ENVELOPE *env) if (tmp) { tmp = rfc822_cpy_adr_real (tmp); + if (!option (OPTREVREAL)) + safe_free (&tmp->personal); if (!tmp->personal) tmp->personal = safe_strdup (Realname); }