]> granicus.if.org Git - mutt/commitdiff
Add $reverse_realname option. Essentially suggested by ws@rhein.de.
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 2 Mar 2000 09:47:55 +0000 (09:47 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 2 Mar 2000 09:47:55 +0000 (09:47 +0000)
init.h
mutt.h
send.c

diff --git a/init.h b/init.h
index afc4ed1633224aafb3c3eb990761fda858c34310..763a6f726fe763e66fb3e77f3cf029fe8310bbdd 100644 (file)
--- 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 72171b85dbacc04492e0578043bcf53d61072204..8cfff810b433c6bc143e3ef201d8494e355dd40f 100644 (file)
--- 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 9723dc55f29d7e8ac3f4122b0752651885beb73f..b7533ed88f808dcd7b12dac360e91ef2439035d8 100644 (file)
--- 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);
   }