]> granicus.if.org Git - neomutt/commitdiff
Add %A to the format strings, which expands to the reply-to address
authorMartin Michlmayr <tbm@cyrius.com>
Sun, 22 Dec 2002 11:17:24 +0000 (11:17 +0000)
committerMartin Michlmayr <tbm@cyrius.com>
Sun, 22 Dec 2002 11:17:24 +0000 (11:17 +0000)
(if present) or to the author's address when there's no Reply-To
header.

hdrline.c
init.h

index 33c8108ae53e5a1aad77cb10b8f8b8e6f1e60c26..5634a6b5f83fe61a3f27c0808f0a0ac2570f2296 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -205,6 +205,7 @@ int mutt_user_is_recipient (HEADER *h)
 }
 
 /* %a = address of author
+ * %A = reply-to address (if present; otherwise: address of author
  * %b = filename of the originating folder
  * %B = the list to which the letter was sent
  * %c = size of message in bytes
@@ -267,6 +268,14 @@ hdr_format_str (char *dest,
   dest[0] = 0;
   switch (op)
   {
+    case 'A':
+      if(hdr->env->reply_to && hdr->env->reply_to->mailbox)
+      {
+       mutt_format_s (dest, destlen, prefix, hdr->env->reply_to->mailbox);
+       break;
+      }
+      /* fall through if 'A' returns nothing */
+
     case 'a':
       if(hdr->env->from && hdr->env->from->mailbox)
       {
diff --git a/init.h b/init.h
index 41eb2cf0aa951103dfabab2c731868e7711730b5..2de7883e6c835d6bf4c5820be67996161873cb5f 100644 (file)
--- a/init.h
+++ b/init.h
@@ -875,6 +875,7 @@ struct option_t MuttVars[] = {
   ** .pp
   ** .dl
   ** .dt %a .dd address of the author
+  ** .dt %A .dd reply-to address (if present; otherwise: address of author)
   ** .dt %b .dd filename of the original message folder (think mailBox)
   ** .dt %B .dd the list to which the letter was sent, or else the folder name (%b).
   ** .dt %c .dd number of characters (bytes) in the message