nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 299e710845546a4a8c6c6dd6d19d90b6a4b11709
parent d9ba6c10d2c1df9f3b28856a25992efc447b89dd
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Tue, 22 May 2018 18:25:59 +0200

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.

Diffstat:
Mdoc/nano.1 | 8+++++---
Mdoc/nano.texi | 10+++++-----
Mdoc/nanorc.5 | 2+-
Msrc/nano.c | 3++-
4 files changed, 13 insertions(+), 10 deletions(-)

diff --git 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 @@ -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 @@ -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 @@ -818,7 +818,8 @@ void usage(void) N_("Log & read location of cursor position")); #endif #ifdef ENABLE_JUSTIFY - print_opt(_("-Q <str>"), _("--quotestr=<str>"), N_("Quoting string")); + print_opt(_("-Q <regex>"), _("--quotestr=<regex>"), + N_("Regular expression to match quoting")); #endif if (!ISSET(RESTRICTED)) print_opt("-R", "--restricted", N_("Restricted mode"));