diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-08-21 23:32:38 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-08-21 23:32:38 +0300 |
commit | 2b6416ef15089f8780583bfa773ac8878f9e44f3 (patch) | |
tree | e9e4361b6fce061c8d7399d90eda4043568e740d /mh/comp.c | |
parent | c0920d67832b696e263bf20091b0652fe52491aa (diff) | |
download | mailutils-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/comp.c')
-rw-r--r-- | mh/comp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -75,6 +75,7 @@ struct mh_option mh_option[] = { struct mh_whatnow_env wh_env = { 0 }; static int initial_edit = 1; static const char *whatnowproc; +static int nowhatnowproc; char *formfile; static int build_only = 0; /* --build flag */ static int use_draft = 0; /* --use flag */ @@ -143,7 +144,7 @@ opt_handler (int key, char *arg, struct argp_state *state) break; case ARG_NOWHATNOWPROC: - whatnowproc = NULL; + nowhatnowproc = 1; break; case ARGP_KEY_FINI: @@ -304,7 +305,7 @@ main (int argc, char **argv) } /* Exit immediately if --build is given */ - if (build_only) + if (build_only || nowhatnowproc) return 0; return mh_whatnowproc (&wh_env, initial_edit, whatnowproc); |