From 299e710845546a4a8c6c6dd6d19d90b6a4b11709 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 22 May 2018 18:25:59 +0200 Subject: [PATCH] docs, usage: make it clear that the argument of --quotestr is a regex In the past, the argument could be either a regex or a literal string, so the wording was kind of vague. But nowadays we can count on having regex support (through gnulib), so be more precise in the description. --- doc/nano.1 | 8 +++++--- doc/nano.texi | 10 +++++----- doc/nanorc.5 | 2 +- src/nano.c | 3 ++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/doc/nano.1 b/doc/nano.1 index 891cbc85..75b2ecf1 100644 --- a/doc/nano.1 +++ b/doc/nano.1 @@ -122,9 +122,11 @@ Use the blank line below the title bar as extra editing space. For the 200 most recent files, log the last position of the cursor, and place it at that position again upon reopening such a file. .TP -.BR "\-Q ""\fIcharacters\fB""" ", " "\-\-quotestr=""" \fIcharacters """ -Set the quoting string for justifying. The default is -\fB"^([\ \\t]*[#:>|}])+"\fP. Note that \fB\\t\fP stands for an actual Tab. +.BR "\-Q ""\fIregex\fB""" ", " "\-\-quotestr=""" \fIregex """ +Set the regular expression for matching the quoting part of a line. +This is used when justifying. +The default value is \fB"^([\ \\t]*[#:>|}])+"\fP. +Note that \fB\\t\fP stands for an actual Tab. .TP .BR \-R ", " \-\-restricted Restricted mode: don't read or write to any file not specified on the diff --git a/doc/nano.texi b/doc/nano.texi index 9da7fa97..9e449c04 100644 --- a/doc/nano.texi +++ b/doc/nano.texi @@ -218,10 +218,10 @@ Use the blank line below the title bar as extra editing space. For the 200 most recent files, log the last position of the cursor, and place it at that position again upon reopening such a file. -@item -Q "@var{characters}" -@itemx --quotestr="@var{characters}" -Set the quoting string for justifying. The default value is -@t{"^([@w{ }\t]*[#:>|@}])+"}. +@item -Q "@var{regex}" +@itemx --quotestr="@var{regex}" +Set the regular expression for matching the quoting part of a line, used +when justifying. The default value is @t{"^([@w{ }\t]*[#:>|@}])+"}. Note that @code{\t} stands for a literal Tab character. @item -R @@ -845,7 +845,7 @@ keystroke instead of 25. Note that @option{constantshow} overrides this. @item set quiet Obsolete option. Recognized but ignored. -@item set quotestr "@var{string}" +@item set quotestr "@var{regex}" The email-quote string, used to justify email-quoted paragraphs. This is an extended regular expression. The default value is @t{"^([@w{ }\t]*[#:>|@}])+"}. diff --git a/doc/nanorc.5 b/doc/nanorc.5 index 2bdbfd62..9d487642 100644 --- a/doc/nanorc.5 +++ b/doc/nanorc.5 @@ -201,7 +201,7 @@ keystroke instead of 25. The option \fBconstantshow\fR overrides this. .B set quiet Obsolete option. Recognized but ignored. .TP -.B set quotestr "\fIstring\fP" +.B set quotestr "\fIregex\fP" The email-quote string, used to justify email-quoted paragraphs. This is an extended regular expression. The default value is "\fB^([\ \\t]*[#:>|}])+\fP". Note that \fB\\t\fR stands for an actual diff --git a/src/nano.c b/src/nano.c index cd94ea7a..54053366 100644 --- a/src/nano.c +++ b/src/nano.c @@ -818,7 +818,8 @@ void usage(void) N_("Log & read location of cursor position")); #endif #ifdef ENABLE_JUSTIFY - print_opt(_("-Q "), _("--quotestr="), N_("Quoting string")); + print_opt(_("-Q "), _("--quotestr="), + N_("Regular expression to match quoting")); #endif if (!ISSET(RESTRICTED)) print_opt("-R", "--restricted", N_("Restricted mode"));