From: Thomas Roessler Date: Tue, 7 Nov 2000 10:31:51 +0000 (+0000) Subject: Add a sig_on_top option. X-Git-Tag: mutt-1-3-12-rel~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31fc4f13c56f6f6a3f6214cc47be48043cf6bd03;p=mutt Add a sig_on_top option. --- diff --git a/init.h b/init.h index ba64f603..c2b9d78f 100644 --- 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 e5cc5d86..6327c290 100644 --- 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 01742523..0668a3c3 100644 --- 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); /*