nano

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

commit cd8e932c65b8bb0051d781336a8b2fefd98e781f
parent fce54a724d70d11d238b4f329943c8faf08d1eb5
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 21 May 2018 20:27:56 +0200

main: add "/" to the quoting regex, to allow justifying //-comments

And adjust the documentation accordingly.

Diffstat:
Mdoc/nano.1 | 2+-
Mdoc/nano.texi | 4++--
Mdoc/nanorc.5 | 2+-
Mdoc/sample.nanorc.in | 2+-
Msrc/nano.c | 2+-
5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/nano.1 b/doc/nano.1 @@ -125,7 +125,7 @@ and place it at that position again upon reopening such a file. .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. +The default value is \fB"^([\ \\t]*[#/:>|}])+"\fP. Note that \fB\\t\fP stands for an actual Tab. .TP .BR \-R ", " \-\-restricted diff --git a/doc/nano.texi b/doc/nano.texi @@ -221,7 +221,7 @@ and place it at that position again upon reopening such a file. @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]*[#:>|@}])+"}. +when justifying. The default value is @t{"^([@w{ }\t]*[#/:>|@}])+"}. Note that @code{\t} stands for a literal Tab character. @item -R @@ -848,7 +848,7 @@ Obsolete option. Recognized but ignored. @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]*[#:>|@}])+"}. +@t{"^([@w{ }\t]*[#/:>|@}])+"}. Note that @code{\t} stands for a literal Tab character. @item set rebinddelete diff --git a/doc/nanorc.5 b/doc/nanorc.5 @@ -204,7 +204,7 @@ Obsolete option. Recognized but ignored. .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 +"\fB^([\ \\t]*[#/:>|}])+\fP". Note that \fB\\t\fR stands for an actual Tab character. .TP .B set rebinddelete diff --git a/doc/sample.nanorc.in b/doc/sample.nanorc.in @@ -126,7 +126,7 @@ ## The email-quote string, used to justify email-quoted paragraphs. ## This is an extended regular expression. The default is: -# set quotestr "^([ ]*[#:>|}])+" +# set quotestr "^([ ]*[#/:>|}])+" ## Fix Backspace/Delete confusion problem. # set rebinddelete diff --git a/src/nano.c b/src/nano.c @@ -2470,7 +2470,7 @@ int main(int argc, char **argv) if (brackets == NULL) brackets = mallocstrcpy(NULL, "\"')>]}"); if (quotestr == NULL) - quotestr = mallocstrcpy(NULL, "^([ \t]*[#:>|}])+"); + quotestr = mallocstrcpy(NULL, "^([ \t]*[#/:>|}])+"); /* Compile the quoting regex, and free it when it's good; otherwise, * retrieve and store the error message, to be shown when justifying. */