summaryrefslogtreecommitdiff
path: root/mh/repl.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-08-21 23:32:38 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2016-08-21 23:32:38 +0300
commit2b6416ef15089f8780583bfa773ac8878f9e44f3 (patch)
treee9e4361b6fce061c8d7399d90eda4043568e740d /mh/repl.c
parentc0920d67832b696e263bf20091b0652fe52491aa (diff)
downloadmailutils-2b6416ef15089f8780583bfa773ac8878f9e44f3.tar.gz
mailutils-2b6416ef15089f8780583bfa773ac8878f9e44f3.tar.bz2
mh: fix the -nowhatnowproc option
The -nowhatnowproc option inhibits the invocation of whatnow, and consequently, prevents the editing of the draft from occurring.
Diffstat (limited to 'mh/repl.c')
-rw-r--r--mh/repl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mh/repl.c b/mh/repl.c
index a90bda9ce..2d5c9a638 100644
--- a/mh/repl.c
+++ b/mh/repl.c
@@ -115,6 +115,7 @@ static const char *whatnowproc;
static mu_msgset_t msgset;
static mu_mailbox_t mbox;
static int build_only = 0; /* --build flag */
+static int nowhatnowproc = 0; /* --nowhatnowproc */
static int query_mode = 0; /* --query flag */
static int use_draft = 0; /* --use flag */
static char *mhl_filter = NULL; /* --filter flag */
@@ -261,7 +262,7 @@ opt_handler (int key, char *arg, struct argp_state *state)
break;
case ARG_NOWHATNOWPROC:
- whatnowproc = NULL;
+ nowhatnowproc = 1;
break;
case ARGP_KEY_FINI:
@@ -432,7 +433,7 @@ main (int argc, char **argv)
make_draft (mbox, DISP_REPLACE, &wh_env);
/* Exit immediately if --build is given */
- if (build_only)
+ if (build_only || nowhatnowproc)
return 0;
rc = mh_whatnowproc (&wh_env, initial_edit, whatnowproc);

Return to:

Send suggestions and report system problems to the System administrator.