Commit 24f39d3a authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Tweaking some wordings, adding some missing formatting to the Info document,

and fixing an mdash.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5236 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 40bfc729
Showing with 58 additions and 53 deletions
+58 -53
2015-06-02 Benno Schulenberg <bensberg@justemail.net>
* doc/man/nanorc.5, doc/texinfo/nano.texi: Tweak some wordings, and
add some missing formatting to the Info document, and fix an mdash.
2015-05-31 Mahyar Abbaspour <mahyar.abaspour@gmail.com> 2015-05-31 Mahyar Abbaspour <mahyar.abaspour@gmail.com>
* src/prompt.c (get_statusbar_page_start): Prevent a floating-point * src/prompt.c (get_statusbar_page_start): Prevent a floating-point
exception when the available length for an answer becomes zero. exception when the available length for an answer becomes zero.
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
.\" Documentation License along with this program. If not, see .\" Documentation License along with this program. If not, see
.\" <http://www.gnu.org/licenses/>. .\" <http://www.gnu.org/licenses/>.
.\" .\"
.TH NANORC 5 "version 2.4.0" "March 2015" .TH NANORC 5 "version 2.4.2" "June 2015"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.SH NAME .SH NAME
...@@ -264,31 +264,30 @@ Defines a syntax named \fIstr\fP which can be activated via the ...@@ -264,31 +264,30 @@ Defines a syntax named \fIstr\fP which can be activated via the
.BR \-Y / \-\-syntax .BR \-Y / \-\-syntax
command-line option, or will be automatically activated if command-line option, or will be automatically activated if
the current filename matches the extended regular expression the current filename matches the extended regular expression
\fIfileregex\fP. All following \fBcolor\fP and \fBicolor\fP statements \fIfileregex\fP. All subsequent \fBcolor\fR, \fBicolor\fR,
will apply to this \fIstr\fP syntax until a new syntax is defined. \fBheader\fR and other such statements will apply to this
\fIstr\fP syntax until a new \fBsyntax\fR command is encountered.
The \fBnone\fP syntax is reserved; specifying it on the command line is The \fBnone\fP syntax is reserved; specifying it on the command line is
the same as not having a syntax at all. The \fBdefault\fP syntax is the same as not having a syntax at all. The \fBdefault\fP syntax is
special: it takes no \fIfileregex\fP, and applies to files that don't special: it takes no \fIfileregex\fP, and applies to files that don't
match any other syntax's \fIfileregex\fP. match any syntax's \fIfileregex\fP.
.TP .TP
.BI linter " program " \fR[ "arg " \fR...] .BI linter " program " \fR[ "arg " \fR...]
For the currently defined syntax, use the given \fIprogram\fR Use the given \fIprogram\fR to run a syntax check on the current file
to invoke the linter (this overrides the speller function when (this overrides the speller function when defined).
defined).
.TP .TP
.BI formatter " program " \fR[ "arg " \fR...] .BI formatter " program " \fR[ "arg " \fR...]
For the currently defined syntax, use the given \fIprogram\fR Use the given \fIprogram\fR to automatically reformat text.
to automatically reformat text. Useful in certain programming Useful in certain programming languages (e.g. Go).
languages (e.g. go).
.TP .TP
.BR header " \fIregex\fR " ... .BR header " \fIregex\fR " ...
For the currently defined syntax, add one or more regexes which will Add one or more regexes which will
be compared against the very first line of the file to be edited, be compared against the very first line of the file to be edited,
to determine whether this syntax should be used for that file. to determine whether this syntax should be used for that file.
.TP .TP
.BR magic " \fIregex\fR " ... .BR magic " \fIregex\fR " ...
For the currently defined syntax, add one or more regexes which Add one or more regexes which
will be compared against the result of querying the \fBmagic\fP will be compared against the result of querying the \fBmagic\fP
database about the file to be edited, to determine whether this database about the file to be edited, to determine whether this
syntax should be used for that file. This syntax should be used for that file. This
...@@ -296,7 +295,7 @@ functionality only works when \fBlibmagic\fP is installed on the ...@@ -296,7 +295,7 @@ functionality only works when \fBlibmagic\fP is installed on the
system and will be silently ignored otherwise. system and will be silently ignored otherwise.
.TP .TP
.B color \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ... .B color \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ...
For the currently defined syntax, display all expressions matching Display all pieces of text that match
the extended regular expression \fIregex\fP with foreground color the extended regular expression \fIregex\fP with foreground color
\fIfgcolor\fP and background color \fIbgcolor\fP, at least one of which \fIfgcolor\fP and background color \fIbgcolor\fP, at least one of which
must be specified. Valid colors for foreground and background must be specified. Valid colors for foreground and background
...@@ -307,32 +306,32 @@ foreground. If your terminal supports transparency, not specifying a ...@@ -307,32 +306,32 @@ foreground. If your terminal supports transparency, not specifying a
background. background.
.TP .TP
.B icolor \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ... .B icolor \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ...
Same as above, except that the expression matching is case insensitive. Same as above, except that the text matching is case insensitive.
.TP .TP
.BR color " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIsr\fR"" " end= """\fIer\fR"" .BR color " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIsr\fR"" " end= """\fIer\fR""
Display expressions which start with the extended regular expression Display all pieces of text whose start matches extended regular expression
\fIsr\fP and end with the extended regular expression \fIer\fP with \fIsr\fP and whose end matches extended regular expression \fIer\fP with
foreground color \fIfgcolor\fP and background color \fIbgcolor\fP, foreground color \fIfgcolor\fP and background color \fIbgcolor\fP,
at least one of which must be specified. This allows syntax at least one of which must be specified. This means that, after an
highlighting to span multiple lines. Note that all subsequent instances initial instance of \fIsr\fP, all text will be highlighted until the
of \fIsr\fP after an initial \fIsr\fP is found will be highlighted until first instance of \fIer\fP. This allows syntax highlighting to span
the first instance of \fIer\fP. multiple lines.
.TP .TP
.BR icolor " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIsr\fR"" " end= """\fIer\fR"" .BR icolor " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIsr\fR"" " end= """\fIer\fR""
Same as above, except that the expression matching is case insensitive. Same as above, except that the text matching is case insensitive.
.TP .TP
.BR include " ""\fIsyntaxfile\fR""" .BR include " ""\fIsyntaxfile\fR"""
Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that
\fIsyntaxfile\fP can only contain the above commands, from \fBsyntax\fP \fIsyntaxfile\fP may contain only the above commands, from \fBsyntax\fP
to \fBicolor\fP. to \fBicolor\fP.
.TP .TP
.BI extendsyntax " str directive " \fR[ "arg " \fR...] .BI extendsyntax " str directive " \fR[ "arg " \fR...]
Extend the syntax previously defined as \fIstr\fP to include Extend the syntax previously defined as \fIstr\fP to include
new information. This allows you to add a new \fIcolor\fP, \fIicolor\fP, new information. This allows you to add a new \fBcolor\fP, \fBicolor\fP,
\fImagic\fP, \fIheader\fP, or \fIlinter\fP directive to an already \fBheader\fP, \fBmagic\fP, \fBlinter\fP, or \fBformatter\fP directive
defined syntax -- useful when you want to add to definitions from the to an already defined syntax -- useful when you want to
system-installed syntax definitions (which are normally not writable). slightly improve a syntax defined in one of the system-installed
files (which are normally not writable)
.SH REBINDING KEYS .SH REBINDING KEYS
Key bindings may be reassigned via the following commands: Key bindings may be reassigned via the following commands:
.TP .TP
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
@c Run 'makeinfo' rather than 'texinfo-format-buffer'. @c Run 'makeinfo' rather than 'texinfo-format-buffer'.
@smallbook @smallbook
@set EDITION 0.3 @set EDITION 0.3
@set VERSION 2.4.1 @set VERSION 2.4.2
@set UPDATED April 2015 @set UPDATED June 2015
@dircategory Editors @dircategory Editors
@direntry @direntry
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
@titlepage @titlepage
@title GNU @code{nano} @title GNU @code{nano}
@subtitle a small and friendly text editor. @subtitle a small and friendly text editor.
@subtitle version 2.4.1 @subtitle version 2.4.2
@author Chris Allegretta @author Chris Allegretta
@page @page
...@@ -828,39 +828,40 @@ via the following commands in a nanorc file: ...@@ -828,39 +828,40 @@ via the following commands in a nanorc file:
@table @code @table @code
@item syntax "str" ["fileregex" @dots{}] @item syntax "str" ["fileregex" @dots{}]
Defines a syntax named "str" which can be activated via the -Y/--syntax Defines a syntax named "str" which can be activated via the @code{-Y/--syntax}
command-line option, or will be automatically activated if the current command-line option, or will be automatically activated if the current
filename matches the extended regular expression "fileregex". All filename matches the extended regular expression "fileregex". All
following "color" and "icolor" statements will apply to this "str" subsequent @code{color}, @code{icolor}, @code{header} and other such
syntax until a new syntax is defined. statements will apply to this "str" syntax until a new @code{syntax}
command is encountered.
The "none" syntax is reserved; specifying it on the command line is the The "none" syntax is reserved; specifying it on the command line is the
same as not having a syntax at all. The "default" syntax is special: it same as not having a syntax at all. The "default" syntax is special: it
takes no "fileregex", and applies to files that don't match any other takes no "fileregex", and applies to files that don't match any
syntax's "fileregex". syntax's "fileregex".
@item linter program [arg @dots{}] @item linter program [arg @dots{}]
For the currently defined syntax, use the given program to invoke the Use the given program to do a syntax check on the current file
linter (this overrides the speller function when defined). (this overrides the speller function when defined).
@item formatter program [arg @dots{}] @item formatter program [arg @dots{}]
For the currently defined syntax, use the given program to automatically Use the given program to automatically reformat text.
reformat text. Useful in certain programming languages (e.g. go). Useful in certain programming languages (e.g. Go).
@item header "regex" @dots{} @item header "regex" @dots{}
For the currently defined syntax, add one or more regexes which will Add one or more regexes which will
be compared against the very first line of the file to be edited, be compared against the very first line of the file to be edited,
to determine whether this syntax should be used for that file. to determine whether this syntax should be used for that file.
@item magic "regex" @dots{} @item magic "regex" @dots{}
For the currently defined syntax, add one or more regexes which will be Add one or more regexes which will be
compared against the result of querying the magic database about the file compared against the result of querying the magic database about the file
to be edited, to determine whether this syntax should be used for that to be edited, to determine whether this syntax should be used for that
file. This functionality only works when libmagic is installed on the file. This functionality only works when libmagic is installed on the
system and will be silently ignored otherwise. system and will be silently ignored otherwise.
@item color fgcolor,bgcolor "regex" @dots{} @item color fgcolor,bgcolor "regex" @dots{}
For the currently defined syntax, display all expressions matching the Display all pieces of text that match the
extended regular expression "regex" with foreground color "fgcolor" and extended regular expression "regex" with foreground color "fgcolor" and
background color "bgcolor", at least one of which must be specified. background color "bgcolor", at least one of which must be specified.
Valid colors for foreground and background are: white, black, red, Valid colors for foreground and background are: white, black, red,
...@@ -870,29 +871,30 @@ terminal supports transparency, not specifying a "bgcolor" tells @code{nano} ...@@ -870,29 +871,30 @@ terminal supports transparency, not specifying a "bgcolor" tells @code{nano}
to attempt to use a transparent background. to attempt to use a transparent background.
@item icolor fgcolor,bgcolor "regex" @dots{} @item icolor fgcolor,bgcolor "regex" @dots{}
Same as above, except that the expression matching is case insensitive. Same as above, except that the text matching is case insensitive.
@item color fgcolor,bgcolor start="sr" end="er" @item color fgcolor,bgcolor start="sr" end="er"
Display expressions which start with the extended regular expression Display all pieces of text whose start matches extended regular expression
"sr" and end with the extended regular expression "er" with foreground "sr" and whose end matches extended regular expression "er" with foreground
color "fgcolor" and background color "bgcolor", at least one of which color "fgcolor" and background color "bgcolor", at least one of which
must be specified. This allows syntax highlighting to span multiple must be specified. This means that, after an initial instance of "sr",
lines. Note that all subsequent instances of "sr" after an initial "sr" all text will be highlighted until the first instance of "er".
is found will be highlighted until the first instance of "er". This allows syntax highlighting to span multiple lines.
@item icolor fgcolor,bgcolor start="sr" end="er" @item icolor fgcolor,bgcolor start="sr" end="er"
Same as above, except that the expression matching is case insensitive. Same as above, except that the text matching is case insensitive.
@item include "syntaxfile" @item include "syntaxfile"
Read in self-contained color syntaxes from "syntaxfile". Note that Read in self-contained color syntaxes from "syntaxfile". Note that
"syntaxfile" can only contain the above commands, from "syntax" to "syntaxfile" may contain only the above commands, from @code{syntax}
"icolor". to @code{icolor}.
@item extendsyntax str directive [arg @dots{}] @item extendsyntax str directive [arg @dots{}]
Extend the syntax previously defined as str to include new information. Extend the syntax previously defined as str to include new information.
Allows you to add a new color, icolor, magic, header, or linter directive This allows you to add a new @code{color}, @code{icolor}, @code{header},
to an already defined syntax. Useful when you want to add to definitions @code{magic}, @code{linter}, or @code{formatter} directive to an already
from the system-installed syntax definitions (which are normally not writable). defined syntax --- useful when you want to slightly improve a syntax defined
in one of the system-installed files (which are normally not writable).
@end table @end table
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment