From 548144dadf111259ad50260e7852da51fc8be04a Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Mon, 9 Sep 2002 20:20:20 +0000 Subject: [PATCH] Introducing $forward_edit. --- init.h | 7 +++++++ mutt.h | 1 + send.c | 17 +++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/init.h b/init.h index aacc98d5..1d16c348 100644 --- a/init.h +++ b/init.h @@ -588,6 +588,13 @@ struct option_t MuttVars[] = { { "forw_decode", DT_SYN, R_NONE, UL "forward_decode", 0 }, /* */ + { "forward_edit", DT_QUAD, R_NONE, OPT_FORWEDIT, M_YES }, + /* + ** .pp + ** This quadoption controls whether or not the user is automatically + ** placed in the editor when forwarding messages. For those who always want + ** to forward with no modification, use a setting to ``no''. + */ { "forward_format", DT_STR, R_NONE, UL &ForwFmt, UL "[%a: %s]" }, /* ** .pp diff --git a/mutt.h b/mutt.h index f87d7184..39f8d9c1 100644 --- a/mutt.h +++ b/mutt.h @@ -294,6 +294,7 @@ enum OPT_RECALL, OPT_SUBJECT, OPT_MIMEFWDREST, + OPT_FORWEDIT, OPT_MAX }; diff --git a/send.c b/send.c index 4489629c..85186b56 100644 --- a/send.c +++ b/send.c @@ -1297,9 +1297,22 @@ ci_send_message (int flags, /* send mode */ mutt_update_encoding (msg->content); - /* If the this isn't a text message, look for a mailcap edit command */ - if(! (flags & SENDKEY)) + /* + * Select whether or not the user's editor should be called now. We + * don't want to do this when: + * 1) we are sending a key/cert + * 2) we are forwarding a message and the user doesn't want to edit it. + * This is controled by the quadoption $forward_edit. However, if + * both $edit_headers and $autoedit are set, we want to ignore the + * setting of $forward_edit because the user probably needs to add the + * recipients. + */ + if (! (flags & SENDKEY) && + ((flags & SENDFORWARD) == 0 || + (option (OPTEDITHDRS) && option (OPTAUTOEDIT)) || + query_quadoption (OPT_FORWEDIT, _("Edit forwarded message?")) == M_YES)) { + /* If the this isn't a text message, look for a mailcap edit command */ if (mutt_needs_mailcap (msg->content)) mutt_edit_attachment (msg->content); else if (!Editor || mutt_strcmp ("builtin", Editor) == 0) -- 2.40.0