From c3a11fb7edcff930be065ca609bc255bcef2b104 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 7 Oct 2017 16:45:17 +0200 Subject: [PATCH] options: remove '--quiet' and 'set quiet', because they hide problems If the user uses a single version of nano, they have no need for --quiet. If they do sometimes use an older version and don't want to see the warnings, they can use 2>/dev/null (they could make an alias for that and put it before the call of nano). --- doc/nano.1 | 3 +-- doc/nano.texi | 7 ++----- doc/nanorc.5 | 4 +--- doc/sample.nanorc.in | 5 ----- src/nano.c | 8 +------- src/rcfile.c | 3 --- 6 files changed, 5 insertions(+), 25 deletions(-) diff --git a/doc/nano.1 b/doc/nano.1 index a6d61849..b835eb06 100644 --- a/doc/nano.1 +++ b/doc/nano.1 @@ -217,8 +217,7 @@ Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught by the terminal. .TP .BR \-q ", " \-\-quiet -Do not report errors in the \fInanorc\fP files nor ask them to be -acknowledged by pressing Enter at startup. +Obsolete option. Recognized but ignored. .TP .BR \-r\ \fInumber ", " \-\-fill= \fInumber Hard-wrap lines at column \fInumber\fP. If this value is 0 or less, wrapping diff --git a/doc/nano.texi b/doc/nano.texi index bd05a016..aee41480 100644 --- a/doc/nano.texi +++ b/doc/nano.texi @@ -335,8 +335,7 @@ sent to the editor can be stopped and started. @item -q @itemx --quiet -Do not report errors in the nanorc file nor ask them to be acknowledged -by pressing @kbd{Enter} at startup. +Obsolete option. Recognized but ignored. @item -r @var{number} @itemx --fill=@var{number} @@ -828,9 +827,7 @@ Do quick status-bar blanking: status-bar messages will disappear after 1 keystroke instead of 25. Note that @option{constantshow} overrides this. @item set quiet -When set, @command{nano} will not report errors in the nanorc file nor ask them -to be acknowledged by pressing @kbd{Enter} at startup. If this option is used, it -should be placed at the top of the file to be fully effective. +Obsolete option. Recognized but ignored. @item set quotestr "@var{string}" The email-quote string, used to justify email-quoted paragraphs. This diff --git a/doc/nanorc.5 b/doc/nanorc.5 index 00631b02..2de48b9d 100644 --- a/doc/nanorc.5 +++ b/doc/nanorc.5 @@ -195,9 +195,7 @@ Do quick status-bar blanking: status-bar messages will disappear after 1 keystroke instead of 25. The option \fBconstantshow\fR overrides this. .TP .B set quiet -\fBnano\fP will not report errors in the \fInanorc\fP file nor ask them -to be acknowledged by pressing Enter at startup. If this is used, it -should be placed at the top of the file to be fully effective. +Obsolete option. Recognized but ignored. .TP .B set quotestr "\fIstring\fP" The email-quote string, used to justify email-quoted paragraphs. This diff --git a/doc/sample.nanorc.in b/doc/sample.nanorc.in index 58017593..7f6218c5 100644 --- a/doc/sample.nanorc.in +++ b/doc/sample.nanorc.in @@ -15,11 +15,6 @@ ## its end. For example, for the "brackets" option, ""')>]}" will match ## ", ', ), >, ], and }. -## Silently ignore problems with unknown directives in the nanorc file. -## Useful when your nanorc file might be read on systems with multiple -## versions of nano installed (e.g. your home directory is on NFS). -# set quiet - ## When soft line wrapping is enabled, make it wrap lines at blanks ## (tabs and spaces) instead of always at the edge of the screen. # set atblanks diff --git a/src/nano.c b/src/nano.c index f4196aac..3db1ee63 100644 --- a/src/nano.c +++ b/src/nano.c @@ -880,11 +880,6 @@ void usage(void) N_("Set operating directory")); #endif print_opt("-p", "--preserve", N_("Preserve XON (^Q) and XOFF (^S) keys")); -#ifdef ENABLE_NANORC - if (!ISSET(RESTRICTED)) - print_opt("-q", "--quiet", - N_("Silently ignore startup issues like rc file errors")); -#endif #ifdef ENABLED_WRAPORJUSTIFY print_opt(_("-r <#cols>"), _("--fill=<#cols>"), N_("Set hard-wrapping point at column #cols")); @@ -2166,8 +2161,7 @@ int main(int argc, char **argv) SET(PRESERVE); break; #ifdef ENABLE_NANORC - case 'q': - SET(QUIET); + case 'q': /* obsolete, ignored */ break; #endif #ifdef ENABLED_WRAPORJUSTIFY diff --git a/src/rcfile.c b/src/rcfile.c index 57c4db80..8fa2f737 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -141,9 +141,6 @@ void rcfile_error(const char *msg, ...) { va_list ap; - if (ISSET(QUIET)) - return; - if (lineno > 0) fprintf(stderr, _("Error in %s on line %lu: "), nanorc, (unsigned long)lineno);