commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mailutils branch, master, updated. release-2.2-755-g2b6416e


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-755-g2b6416e
Date: Sun, 21 Aug 2016 20:37:52 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=2b6416ef15089f8780583bfa773ac8878f9e44f3

The branch, master has been updated
       via  2b6416ef15089f8780583bfa773ac8878f9e44f3 (commit)
      from  c0920d67832b696e263bf20091b0652fe52491aa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2b6416ef15089f8780583bfa773ac8878f9e44f3
Author: Sergey Poznyakoff <address@hidden>
Date:   Sun Aug 21 23:32:38 2016 +0300

    mh: fix the -nowhatnowproc option
    
    The -nowhatnowproc option inhibits the invocation of whatnow, and
    consequently, prevents the editing of the draft from occurring.

-----------------------------------------------------------------------

Summary of changes:
 mh/comp.c      |    5 +++--
 mh/forw.c      |    5 +++--
 mh/mh_global.c |    2 +-
 mh/repl.c      |    5 +++--
 4 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/mh/comp.c b/mh/comp.c
index d89bb8c..bec244c 100644
--- a/mh/comp.c
+++ b/mh/comp.c
@@ -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);
diff --git a/mh/forw.c b/mh/forw.c
index 1c9054c..e983ed5 100644
--- a/mh/forw.c
+++ b/mh/forw.c
@@ -107,6 +107,7 @@ static const char *whatnowproc;
 static char *mhl_filter_file = NULL; /* --filter flag */
 
 static int build_only = 0;      /* --build flag */
+static int nowhatnowproc = 0;   /* --nowhatnowproc */
 static int annotate = 0;        /* --annotate flag */
 static enum encap_type encap = encap_clear; /* controlled by --format, --form
                                               and --mime flags */
@@ -222,7 +223,7 @@ opt_handler (int key, char *arg, struct argp_state *state)
       break;
 
     case ARG_NOWHATNOWPROC:
-      whatnowproc = NULL;
+      nowhatnowproc = 1;
       break;
 
     case ARGP_KEY_FINI:
@@ -530,7 +531,7 @@ main (int argc, char **argv)
     }
   
   /* Exit immediately if --build is given */
-  if (build_only)
+  if (build_only || nowhatnowproc)
     {
       if (strcmp (wh_env.file, wh_env.draftfile))
        rename (wh_env.file, wh_env.draftfile);
diff --git a/mh/mh_global.c b/mh/mh_global.c
index d464cec..76b5e73 100644
--- a/mh/mh_global.c
+++ b/mh/mh_global.c
@@ -226,7 +226,7 @@ mh_global_save_state ()
   rc = mu_property_save (mu_mh_context);
   if (rc)
     {
-      mu_diag_funcall (MU_DIAG_ERROR, "mu_profile_save", "context", rc);
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_property_save", "context", rc);
       exit (1);
     }
 }
diff --git a/mh/repl.c b/mh/repl.c
index a90bda9..2d5c9a6 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);


hooks/post-receive
-- 
GNU Mailutils



reply via email to

[Prev in Thread] Current Thread [Next in Thread]