From 79971a309f837dd24ce70e11b5b61fa18209cf1c Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 6 Jul 2017 21:35:07 +0200 Subject: [PATCH] docs: remove the mention of backslashes for the argument of 'comment' Also remove the backslashes from the two syntaxes that contained them. This completes the fix for https://savannah.gnu.org/bugs/?51370. --- doc/nano.texi | 10 +++++----- doc/nanorc.5 | 12 ++++++------ syntax/groff.nanorc | 2 +- syntax/man.nanorc | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/nano.texi b/doc/nano.texi index ff6f7c8c..22767216 100644 --- a/doc/nano.texi +++ b/doc/nano.texi @@ -933,14 +933,14 @@ file. This functionality only works when libmagic is installed on the system and will be silently ignored otherwise. @item comment "string" -Use the given string for commenting and uncommenting lines. A vertical bar or -pipe character (@t{|}) designates bracket-style comments; for example, @t{"/*|*/"} for +Use the given string for commenting and uncommenting lines. +If the string contains a vertical bar or pipe character (@t{|}), +this designates bracket-style comments; for example, @t{"/*|*/"} for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe -character is present, the entire string is prepended; for example, @t{"#"} for +character is present, the full string is prepended; for example, @t{"#"} for Python files. If empty double quotes are specified, the comment/uncomment -functions are disabled; for example, @t{""} for JSON. Backslashes and double quotes -should be escaped with a backslash; for example, @t{".\\\""} for man page source. +functions are disabled; for example, @t{""} for JSON. The default value is @t{"#"}. @item color fgcolor,bgcolor "regex" @dots{} diff --git a/doc/nanorc.5 b/doc/nanorc.5 index 32568d85..d46439bb 100644 --- a/doc/nanorc.5 +++ b/doc/nanorc.5 @@ -329,14 +329,14 @@ functionality only works when \fBlibmagic\fP is installed on the system and will be silently ignored otherwise. .TP .BI comment " string" -Use the given string for commenting and uncommenting lines. A vertical bar or -pipe character (\fB|\fP) designates bracket-style comments; for example, "\fB/*|*/\fP" for +Use the given string for commenting and uncommenting lines. +If the string contains a vertical bar or pipe character (\fB|\fR), +this designates bracket-style comments; for example, "\fB/*|*/\fR" for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe -character is present, the entire string is prepended; for example, "\fB#\fP" for -Python files. If empty double quotes are specified, the comment/uncomment -function is disabled; for example, "" for JSON. Backslashes and double quotes -should be escaped with a backslash; for example, "\fB.\\\"\fP" for man page source. +character is present, the full string is prepended; for example, "\fB#\fR" +for Python files. If empty double quotes are specified, the comment/uncomment +function is disabled; for example, "" for JSON. The default value is "\fB#\fP". .TP .B color \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ... diff --git a/syntax/groff.nanorc b/syntax/groff.nanorc index f97a1ca2..109f9cd6 100644 --- a/syntax/groff.nanorc +++ b/syntax/groff.nanorc @@ -1,7 +1,7 @@ ## Here is an example for groff. syntax "groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac." -comment ".\\\"" +comment ".\"" # The argument of .ds or .nr color cyan "^\.(ds|nr) [^[:space:]]*" diff --git a/syntax/man.nanorc b/syntax/man.nanorc index e5da5bec..dd7d23ea 100644 --- a/syntax/man.nanorc +++ b/syntax/man.nanorc @@ -2,7 +2,7 @@ syntax "man" "\.[1-9]x?$" magic "troff or preprocessor input text" -comment ".\\\"" +comment ".\"" color green "\.(SH|SS|TH) .*$" color brightgreen "\.(SH|SS|TH) " "\.([HIT]P)"