summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--configure.ac2
-rw-r--r--libmailutils/opt/opt.c6
3 files changed, 9 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 7ebc72a18..40768fae3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,11 @@
-GNU mailutils NEWS -- history of user-visible changes. 2016-10-19
+GNU mailutils NEWS -- history of user-visible changes. 2016-10-28
Copyright (C) 2002-2016 Free Software Foundation, Inc.
See the end of file for copying conditions.
Please send mailutils bug reports to <bug-mailutils@gnu.org>.
-Version 2.99.991 (Git)
+Version 2.99.992 (Git)
This version is a major rewrite of GNU Mailutils. Quite a few parts
of the basic framework were rewritten from scratch, while some others
diff --git a/configure.ac b/configure.ac
index 5fd7d857d..4b88e6c8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU General Public License along
dnl with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.63)
-AC_INIT([GNU Mailutils], [2.99.991], [bug-mailutils@gnu.org], [mailutils],
+AC_INIT([GNU Mailutils], [2.99.992], [bug-mailutils@gnu.org], [mailutils],
[http://mailutils.org])
AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c])
AC_CONFIG_AUX_DIR([build-aux])
diff --git a/libmailutils/opt/opt.c b/libmailutils/opt/opt.c
index 26633bbc4..0a436c563 100644
--- a/libmailutils/opt/opt.c
+++ b/libmailutils/opt/opt.c
@@ -148,7 +148,10 @@ add_option_cache (struct mu_parseopt *po, struct mu_option *opt,
char const *arg)
{
struct mu_option_cache *cache = mu_alloc (sizeof (*cache));
+
cache->cache_opt = opt;
+ if (arg == NULL && opt->opt_default)
+ arg = opt->opt_default;
cache->cache_arg = arg;
if ((po->po_flags & MU_PARSEOPT_IMMEDIATE)
@@ -749,6 +752,9 @@ mu_option_set_value (struct mu_parseopt *po, struct mu_option *opt,
if (arg == NULL)
{
if (opt->opt_default)
+ /* The default value has been already assigned in add_option_cache.
+ This conditional is here in case mu_option_set_value is called
+ from the user code. */
arg = opt->opt_default;
else if (opt->opt_arg == NULL)
arg = "1";

Return to:

Send suggestions and report system problems to the System administrator.