]> granicus.if.org Git - mutt/commitdiff
Add a sig_on_top option.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 7 Nov 2000 10:31:51 +0000 (10:31 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 7 Nov 2000 10:31:51 +0000 (10:31 +0000)
init.h
mutt.h
send.c

diff --git a/init.h b/init.h
index ba64f6033b96af6b65f49c9a3872282a32fb70a4..c2b9d78fd93f7d02a9ea58bd1178ce6917ca17d7 100644 (file)
--- a/init.h
+++ b/init.h
@@ -1802,6 +1802,14 @@ struct option_t MuttVars[] = {
   ** detect your signature.  For example, Mutt has the ability to highlight
   ** the signature in a different color in the builtin pager.
   */
+  { "sig_on_top",      DT_BOOL, R_NONE, OPTSIGONTOP, 0},
+  /*
+  ** .pp
+  ** If set, the signature will be included before any quoted or forwarded
+  ** text.  It is \fBstrongly\fP recommended that you do not set this variable
+  ** unless you really know what you are doing, and are prepared to take
+  ** some heat from netiquette guardians.
+  */
   { "signature",       DT_PATH, R_NONE, UL &Signature, UL "~/.signature" },
   /*
   ** .pp
diff --git a/mutt.h b/mutt.h
index e5cc5d86a25d8a394be209ca5d6c9c23557ed461..6327c290a0d81c030bccdd4266b56835a366b8da 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -352,6 +352,7 @@ enum
   OPTSAVENAME,
   OPTSCORE,
   OPTSIGDASHES,
+  OPTSIGONTOP,
   OPTSORTRE,
   OPTSTATUSONTOP,
   OPTSTRICTTHREADS,
diff --git a/send.c b/send.c
index 01742523af8b1f1820f1cc3323c5d5a5209ebaa6..0668a3c3f70334d55f793f6842ce3248c00cc149 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1175,14 +1175,15 @@ ci_send_message (int flags,             /* send mode */
       process_user_header (msg->env);
 
 
-
+    if (option (OPTSIGONTOP) && (! (flags & (SENDMAILX | SENDKEY)) && Editor && mutt_strcmp (Editor, "builtin") != 0))
+      append_signature (tempfp);
 
     /* include replies/forwarded messages, unless we are given a template */
     if (!tempfile && (ctx || !(flags & (SENDREPLY|SENDFORWARD)))
        && generate_body (tempfp, msg, flags, ctx, cur) == -1)
       goto cleanup;
 
-    if (! (flags & (SENDMAILX | SENDKEY)) && Editor && mutt_strcmp (Editor, "builtin") != 0)
+    if (!option (OPTSIGONTOP) && (! (flags & (SENDMAILX | SENDKEY)) && Editor && mutt_strcmp (Editor, "builtin") != 0))
       append_signature (tempfp);
 
     /*