[PATCH 11/31] docs: favor groff `\[dq]` over multiple " marks
"G. Branden Robinson" <[email protected]> Thu, 23 Apr 2026 17:58:45 -0500
| Newsgroups | gmane.editors.nano.devel |
|---|---|
| Message-ID | <20260423225845.dwluzdpmd2rcft3o@illithid> |
...in macro call arguments. The document already uses the groff `dq` special character and groff's extended `\[xx]` syntax, so improve man source document readability by employing the special character to represent a "literal" neutral double quote in macro call arguments. (On text lines, the `"` already format as itself, like `%` or `$`.) --- doc/nano.1 | 7 ++++--- doc/nanorc.5 | 36 ++++++++++++++++++------------------ 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/doc/nano.1 b/doc/nano.1 index 6e3ac13e..22402b63 100644 --- a/doc/nano.1 +++ b/doc/nano.1 @@ -201,7 +201,7 @@ .SH OPTIONS and place it at that position again upon reopening such a file. Also save and restore the positions of any anchors. .TP -.BI "\-Q """ regex\fB"\fR, " \-\-quotestr=""" regex """" +.BI "\-Q \[dq]" regex "\[dq]\fR, \fB\-\-quotestr=\[dq]" regex \[dq] Set the regular expression for matching the quoting part of a line. The default value is "\fB^([\ \\t]*([!#%:;>|}]|//))+\fR". (Note that \fB\\t\fR stands for an actual Tab.) @@ -241,7 +241,7 @@ .SH OPTIONS Detect word boundaries differently by treating punctuation characters as part of a word. .TP -.BI "\-X """ characters\fB"\fR, " \-\-wordchars=""" characters """" +.BI "\-X \[dq]" characters "\[dq]\fR, \fB\-\-wordchars=\[dq]" characters \[dq] Specify which other characters (besides the normal alphanumeric ones) should be considered as part of a word. When using this option, you probably want to omit \fB\-W\fR (\fB\-\-wordbounds\fR). @@ -341,7 +341,8 @@ .SH OPTIONS point to vary along with the width of the screen if the screen is resized. The default value is \fB\-8\fR. .TP -.B "\-s ""\fIprogram\fR [\fIargument \fR.\|.\|.]\fB""\fR, \fB\-\-speller=""\fIprogram\fR [\fIargument \fR.\|.\|.]\fB""" +.BI "\-s \[dq]" "program \fR[\fIargument \fR.\|.\|.]" "\[dq]\fR, \ +\fB\-\-speller=\[dq]" "program \fR[\fIargument \fR.\|.\|.]" \[dq] Use this command to perform spell checking and correcting, instead of using the built-in corrector that calls \fBhunspell\fR(1) or \fBspell\fR(1). .TP diff --git a/doc/nanorc.5 b/doc/nanorc.5 index b5624969..979d310a 100644 --- a/doc/nanorc.5 +++ b/doc/nanorc.5 @@ -125,7 +125,7 @@ .SH OPTIONS When justifying, treat any line that starts with whitespace as the beginning of a paragraph (unless auto-indenting is on). .TP -.BI "set brackets """ characters """" +.BI "set brackets \[dq]" characters \[dq] Set the characters treated as closing brackets when justifying paragraphs. This may not include blank characters. Only closing punctuation (see \fBset punct\fR), optionally followed by the specified @@ -210,7 +210,7 @@ .SH OPTIONS (Calling libmagic can be relatively time consuming. It is therefore not done by default.) .TP -.BI "set matchbrackets """ characters """" +.BI "set matchbrackets \[dq]" characters \[dq] Specify the opening and closing brackets that can be found by bracket searches. This may not include blank characters. The opening set must come before the closing set, and the two sets must be in the same order. @@ -283,7 +283,7 @@ .SH OPTIONS (When this option is not specified, the colors of the title bar are used.) See \fBset titlecolor\fR for more details. .TP -.BI "set punct """ characters """" +.BI "set punct \[dq]" characters \[dq] Set the characters treated as closing punctuation when justifying paragraphs. This may not include blank characters. Only the specified closing punctuation, optionally followed by closing brackets @@ -296,7 +296,7 @@ .SH OPTIONS \fBquickblank\fR makes a message disappear after 0.8 seconds instead of after the default 1.5 seconds. .TP -.BI "set quotestr """ regex """" +.BI "set quotestr \[dq]" regex \[dq] Set the regular expression for matching the quoting part of a line. The default value is "\fB^([\ \et]*([!#%:;>|}]|//))+\fR". (Note that \fB\et\fR stands for an actual Tab character.) @@ -355,7 +355,7 @@ .SH OPTIONS The single-line jerky sideways scrolling enabled by this option was the old behavior \[em] the only behavior that \fBnano\fR knew. .TP -.B set speller """\fIprogram\fR [\fIargument \fR.\|.\|.]\fB""" +.BI "set speller \[dq]" "program \fR[\fIargument \fR.\|.\|.]" \[dq] Use the given \fIprogram\fR to do spell checking and correcting, instead of using the built-in corrector that calls \fBhunspell\fR(1) or \fBspell\fR(1). .TP @@ -427,7 +427,7 @@ .SH OPTIONS default behavior of saving a file in the format that it had. (This option has no effect when you also use \fBset noconvert\fR.) .TP -.BI "set whitespace """ characters """" +.BI "set whitespace \[dq]" characters \[dq] Set the two characters used to indicate the presence of tabs and spaces. They must be single-column characters. The default pair for a UTF-8 locale is "\fB\[Fc]\[md]\fR", and for other locales "\fB>.\fR". @@ -436,7 +436,7 @@ .SH OPTIONS Detect word boundaries differently by treating punctuation characters as parts of words. .TP -.BI "set wordchars """ characters """" +.BI "set wordchars \[dq]" characters \[dq] Specify which other characters (besides the normal alphanumeric ones) should be considered as parts of words. When using this option, you probably want to unset \fBwordbounds\fR. @@ -486,7 +486,7 @@ .SH SYNTAX HIGHLIGHTING For each kind of file a separate syntax can be defined via the following commands: .TP -.BI syntax " name \fR[" """" fileregex """ " \fR.\|.\|.] +.BI syntax " name \fR[" \[dq] fileregex \[dq] " \fR.\|.\|.]" Start the definition of a syntax with this \fIname\fR. All subsequent \fBcolor\fR and other such commands are added to this syntax, until a new \fBsyntax\fR @@ -504,12 +504,12 @@ .SH SYNTAX HIGHLIGHTING The syntax \fBnone\fR is reserved; specifying it on the command line is the same as not having a syntax at all. .TP -.BI "header """ regex """ " \fR.\|.\|. +.BI "header \[dq]" regex "\[dq] " \fR.\|.\|. If from all defined syntaxes no \fIfileregex\fR matched, then compare this \fIregex\fR (or regexes) against the first line of the current file, to determine whether this syntax should be used for it. .TP -.BI "magic """ regex """ " \fR.\|.\|. +.BI "magic \[dq]" regex "\[dq] " \fR.\|.\|. If no \fIfileregex\fR matched and no \fBheader\fR regex matched either, then compare this \fIregex\fR (or regexes) against the result of querying the \fBmagic\fR database about the current @@ -523,7 +523,7 @@ .SH SYNTAX HIGHLIGHTING .BI linter " program " \fR[ "argument " \fR.\|.\|.] Use the given \fIprogram\fR to run a syntax check on the current buffer. .TP -.BI "comment """ string """" +.BI "comment \[dq]" string \[dq] Use the given \fIstring\fR 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 @@ -534,12 +534,12 @@ .SH SYNTAX HIGHLIGHTING function is disabled; for example, "" for JSON. The default value is "\fB#\fR". .TP -.BI "tabgives """ string """" +.BI "tabgives \[dq]" string \[dq] Make the <Tab> key produce the given \fIstring\fR. Useful for languages like Python that want to see only spaces for indentation. This overrides the setting of the \fBtabstospaces\fR option. .TP -.BI "color \fR[\fBbold,\fR][\fBitalic,\fR]" fgcolor , bgcolor " """ regex """ " \fR.\|.\|. +.BI "color \fR[\fBbold,\fR][\fBitalic,\fR]" fgcolor , bgcolor " \[dq]" regex "\[dq] \fR.\|.\|." Paint all pieces of text that match the extended regular expression \fIregex\fR with the given foreground and background colors, at least one of which must be specified. Valid color names are: @@ -571,10 +571,10 @@ .SH SYNTAX HIGHLIGHTING All coloring commands are applied in the order in which they are specified, which means that later commands can recolor stuff that was colored earlier. .TP -.BI "icolor \fR[\fBbold,\fR][\fBitalic,\fR]" fgcolor , bgcolor " """ regex """ " \fR.\|.\|. +.BI "icolor \fR[\fBbold,\fR][\fBitalic,\fR]" fgcolor , bgcolor " \[dq]" regex "\[dq] \fR.\|.\|." Same as above, except that the matching is case insensitive. .TP -.BI "color \fR[\fBbold,\fR][\fBitalic,\fR]" fgcolor , bgcolor " start=""" fromrx """ end=""" torx """" +.BI "color \fR[\fBbold,\fR][\fBitalic,\fR]" fgcolor , bgcolor " start=\[dq]" fromrx "\[dq] end=\[dq]" torx \[dq] Paint all pieces of text whose start matches extended regular expression \fIfromrx\fR and whose end matches extended regular expression \fItorx\fR with the given foreground and background colors, @@ -583,10 +583,10 @@ .SH SYNTAX HIGHLIGHTING \fItorx\fR is colored. This allows syntax highlighting to span multiple lines. .TP -.BI "icolor \fR[\fBbold,\fR][\fBitalic,\fR]" fgcolor , bgcolor " start=""" fromrx """ end=""" torx """" +.BI "icolor \fR[\fBbold,\fR][\fBitalic,\fR]" fgcolor , bgcolor " start=\[dq]" fromrx "\[dq] end=\[dq]" torx \[dq] Same as above, except that the matching is case insensitive. .TP -.BI "include """ syntaxfile """" +.BI "include \[dq]" syntaxfile \[dq] Read in self-contained color syntaxes from \fIsyntaxfile\fR. Note that \fIsyntaxfile\fR may contain only the above commands, from \fBsyntax\fR to \fBicolor\fR. @@ -608,7 +608,7 @@ .SH REBINDING KEYS Rebinds the given \fIkey\fR to the given \fIfunction\fR in the given \fImenu\fR (or in all menus where the function exists when \fBall\fR is used). .TP -.BI bind " key " """" string """" " menu" +.BI "bind " key " \[dq]" string "\[dq] " menu Makes the given \fIkey\fR produce the given \fIstring\fR in the given \fImenu\fR (or in all menus where the key exists when \fBall\fR is used). Besides literal text and/or control codes, the \fIstring\fR may contain -- 2.30.2
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmnqpCUACgkQ0Z6cfXEm bc4pEA/8C0EttclBtBEFPep5ZUbZVu+QDNl6ikb241OxmE01cmuTcKZd78hAnavR 9TMwfRoQsnfNcYTD7PkReS648fkcjQowD5Qsy6fxhQ1Yz5seXIBSb2h8kbCi63Fg M8kdQsch3zkSoqYy4Mr93USI2Aoqfld1tnMOA1Fvi/azoRFcx8oS8djlZkvY307V J7Ppefjsho924nzxKaC3EDQeN7tIzjWVp6f/jPnGJdUg+9usr5IQImSRZj5NIsqe rNq1nvZ5XiqLr954ohqSwNcpl6p2RPSlZ36pmR2hwSwLr3M1G9Dx4BES1uMLq5U+ uDcecd05WAuTFIPR2kVLvCc+QRZyfiLrKhXu6dN224gqBiTGO97gdaqmbLD3FSwE zbj1Ez3xRvgfvUnW8/7NIWnev/T6zrSrQtR/EgOPg8v+Ow06ofsW0ynvrfn1UzA2 njbSTGQUrx3e/ZVjxpFWntX3h8Kv6QekL+2QGXZVu2b+zMiNm1SaMdGlIb5Umk9v SO2lgYwJX5aXZAXLCLxY+zdWdWCjFK8Rq7G/2c1aSFYtjeooQRqTLF1SnuYBOVP6 /AyhLl6NIi8Pjq3lolYzLuWKlhfkjrgrNHENRvCTomR4+ziusHOfUkdLAN9UyJsh s8VRl8CtWcYEcwC++hFfNASqidO7CIv8P1xu6qWI90GhECJsIYc= =BQt/ -----END PGP SIGNATURE-----