commit 26f5c8b9d5b54037ac4e75403bf58ed1d9eaa27a
parent e1601d2eb5c9a643c4e1f076fbe284b4eb0aac77
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 10 Oct 2020 12:40:38 +0200
rcfile: stop accepting 'set view' in a nanorc file, and undocument it
Like --restricted, --view really only makes sense on the command line.
Diffstat:
5 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/doc/nano.texi b/doc/nano.texi
@@ -1067,11 +1067,6 @@ Save a file by default in Unix format. This overrides nano's
default behavior of saving a file in the format that it had.
(This option has no effect when you also use @code{set noconvert}.)
-@item set view
-Disallow file modification: read-only mode.
-This mode allows the user to open also other files for viewing,
-unless @option{--restricted} is given on the command line.
-
@anchor{Whitespace}
@item set whitespace "@var{characters}"
Set the two characters used to indicate the presence of tabs and
diff --git a/doc/nanorc.5 b/doc/nanorc.5
@@ -352,11 +352,6 @@ Save a file by default in Unix format. This overrides nano's
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
-.B set view
-Disallow file modification: read-only mode.
-This mode allows the user to open also other files for viewing,
-unless \fB\-\-restricted\fR is given on the command line.
-.TP
.BI "set whitespace """ characters """
Set the two characters used to indicate the presence of tabs and
spaces. They must be single-column characters. The default pair
diff --git a/doc/sample.nanorc.in b/doc/sample.nanorc.in
@@ -179,9 +179,6 @@
## Snip whitespace at the end of lines when justifying or hard-wrapping.
# set trimblanks
-## Disallow file modification. Why would you want this in an rcfile? ;)
-# set view
-
## The two single-column characters used to display the first characters
## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these.
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -95,7 +95,6 @@ static const rcoption rcopts[] = {
{"suspend", SUSPENDABLE}, /* Deprecated; remove in 2022. */
{"suspendable", SUSPENDABLE},
{"tempfile", SAVE_ON_EXIT}, /* Deprecated; remove in 2022. */
- {"view", VIEW_MODE},
#ifndef NANO_TINY
{"afterends", AFTER_ENDS},
{"allow_insecure_backup", INSECURE_BACKUP},
diff --git a/syntax/nanorc.nanorc b/syntax/nanorc.nanorc
@@ -7,7 +7,7 @@ comment "#"
color brightred ".*"
# Keywords
-color brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|boldtext|breaklonglines|casesensitive|constantshow|cutfromcursor|emptyline|historylog|indicator|jumpyscrolling|linenumbers|locking|magic|mouse|multibuffer|noconvert|nohelp|nonewlines|positionlog|preserve|quickblank|rawsequences|rebinddelete|regexp|saveonexit|showcursor|smarthome|softwrap|stateflags|suspendable|tabstospaces|trimblanks|unix|view|wordbounds|zap)\>"
+color brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|boldtext|breaklonglines|casesensitive|constantshow|cutfromcursor|emptyline|historylog|indicator|jumpyscrolling|linenumbers|locking|magic|mouse|multibuffer|noconvert|nohelp|nonewlines|positionlog|preserve|quickblank|rawsequences|rebinddelete|regexp|saveonexit|showcursor|smarthome|softwrap|stateflags|suspendable|tabstospaces|trimblanks|unix|wordbounds|zap)\>"
color yellow "^[[:space:]]*set[[:space:]]+((error|function|key|number|scroller|selected|status|stripe|title)color)[[:space:]]+(bold,)?(italic,)?(bright|light)?(white|black|red|blue|green|yellow|magenta|cyan|normal|pink|purple|mauve|lagoon|mint|lime|peach|orange|latte)?(,(light)?(white|black|red|blue|green|yellow|magenta|cyan|normal|pink|purple|mauve|lagoon|mint|lime|peach|orange|latte))?\>"
color brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|errorcolor|functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|scrollercolor|selectedcolor|speller|statuscolor|stripecolor|titlecolor|whitespace|wordchars)[[:space:]]+"
color brightgreen "^[[:space:]]*set[[:space:]]+(fill[[:space:]]+-?[[:digit:]]+|(guidestripe|tabsize)[[:space:]]+[1-9][0-9]*)\>"