<<< Date Index >>>     <<< Thread Index >>>

Re: Customize To: field



* Mon Nov 17 2008 Michael Elkins <me@xxxxxxxxxx>
> What does mutt-dev think about making $reverse_alias apply to replies?

It looks easy.
I don't set $reverse_alias though.

-- 
tamo
diff -r 8199185fa595 send.c
--- a/send.c    Sun Nov 16 21:01:41 2008 -0800
+++ b/send.c    Tue Nov 18 01:53:21 2008 +0900
@@ -192,11 +192,23 @@
   char buf[HUGE_STRING];
   char *err = NULL;
   int idna_ok = 0;
+  ADDRESS *rev, *i;
   
   do
   {
     buf[0] = 0;
     mutt_addrlist_to_local (*a);
+    if (option (OPTREVALIAS))
+    {
+      for (i = *a; i; i = i->next)
+      {
+       if ((rev = alias_reverse_lookup (i)) && rev->personal)
+       {
+         FREE (&i->personal);
+         i->personal = safe_strdup (rev->personal);
+       }
+      }
+    }
     rfc822_write_address (buf, sizeof (buf), *a, 0);
     if (mutt_get_field (field, buf, sizeof (buf), M_ALIAS) != 0)
       return (-1);