Skip to content

Commit 09530bc

Browse files
author
maechler
committed
allow quiet and verbose be true simultaneously
git-svn-id: https://svn.r-project.org/R/trunk@88400 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent e67eeed commit 09530bc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/library/base/man/options.Rd

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% File src/library/base/man/options.Rd
22
% Part of the R package, https://www.R-project.org
3-
% Copyright 1995-2026 R Core Team
3+
% Copyright 1995-2025 R Core Team
44
% Distributed under GPL 2 or later
55

66
\name{options}
@@ -452,9 +452,8 @@ getOption(x, default = NULL)
452452

453453
\item{\code{quiet}:}{logical. Should \R be (more) \dQuote{quiet},
454454
notably on startup report? Set to \code{TRUE} by the command-line
455-
option \option{--quiet}. \code{quiet} and \code{verbose} cannot both
456-
be true.}
457-
455+
option \option{--quiet}.% \code{quiet} and \code{verbose} cannot both be true.
456+
}
458457
\item{\code{warn}:}{integer value to set the handling of warning
459458
messages by the default warning handler. If
460459
\code{warn} is negative all warnings are ignored. If \code{warn}

src/main/options.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,17 +900,21 @@ attribute_hidden SEXP do_options(SEXP call, SEXP op, SEXP args, SEXP rho)
900900
if (TYPEOF(argi) != LGLSXP || LENGTH(argi) != 1)
901901
error(_("invalid value for '%s'"), CHAR(namei));
902902
Rboolean k = asRbool(argi, call);
903+
#ifdef NO_QUIET_AND_VERBOSE
903904
if(k && R_Verbose)
904905
error(_("cannot set both options 'quiet' and 'verbose' to TRUE"));
906+
#endif
905907
R_Quiet = k;
906908
SET_VECTOR_ELT(value, i, SetOption(tag, ScalarLogical(k)));
907909
}
908910
else if (streql(CHAR(namei), "verbose")) {
909911
if (TYPEOF(argi) != LGLSXP || LENGTH(argi) != 1)
910912
error(_("invalid value for '%s'"), CHAR(namei));
911913
Rboolean k = asRbool(argi, call);
914+
#ifdef NO_QUIET_AND_VERBOSE
912915
if(k && R_Quiet)
913916
error(_("cannot set both options 'quiet' and 'verbose' to TRUE"));
917+
#endif
914918
R_Verbose = k;
915919
SET_VECTOR_ELT(value, i, SetOption(tag, ScalarLogical(k)));
916920
}

0 commit comments

Comments
 (0)