Benno Schulenberg
5ca444e5df
startup: allow reading nanorc in restricted mode, to permit customization
...
Move the unsetting of some options further down, to prevent the user's
nanorc enabling things that are not permitted in restricted mode.
Also, in restricted mode, suppress error messages about functions not
being present in the requested menus, so that a nanorc that is valid in
normal mode does not cause unnecessary messages when using --restricted.
This fulfills https://savannah.gnu.org/bugs/?54732 .
Requested-by: Mark Webb-Johnson <mark@webb-johnson.net>
2018-10-02 19:18:55 +02:00
Benno Schulenberg
9e71de12cd
tweaks: improve a translator hint and some other comments
2018-09-09 08:17:22 +02:00
Brand Huntsman
6e80772311
tweaks: correct four spaces of indentation to a tab, in two places
...
Signed-off-by: Brand Huntsman <alpha@qzx.com>
2018-08-29 18:01:21 +02:00
Brand Huntsman
b5ede4ff65
tweaks: remove the 'bright' field from the colortype struct
...
Put the corresponding value into the 'attributes' field sooner.
Signed-off-by: Brand Huntsman <alpha@qzx.com>
2018-08-25 10:54:20 +02:00
Benno Schulenberg
e40e6bbf10
tweaks: rename a function to better match its counterpart
...
Also rename its parameter, to describe what it ought to be.
2018-08-11 09:55:22 +02:00
Benno Schulenberg
2147e161bf
rcfile: when a vital function is not mapped, mention in which menu
...
Add the reverse of the name-to-menu function to accomplish this.
This fixes https://savannah.gnu.org/bugs/?54449 .
2018-08-11 09:46:03 +02:00
Benno Schulenberg
52d851a1aa
startup: don't overwrite rcfile error messages on a Linux console
...
On a Linux VT, refuse to start when there are errors in a nanorc file,
so that the messages no longer get overwritten -- which prevented the
user from seeing and reading them.
This fixes https://savannah.gnu.org/bugs/?54442 .
2018-08-10 19:41:54 +02:00
Benno Schulenberg
975b491235
dropping a feature: remove the ability to use the 'formatter' command
...
Since the last version, the user can filter an entire buffer through
an external command. This external command can also be a formatting
program, so there is no longer any need for this specific and special
formatter command.
2018-08-09 20:29:30 +02:00
Benno Schulenberg
4c66a6259c
tweaks: slightly improve error message when vital function is unmapped
...
This fails to fix https://savannah.gnu.org/bugs/?54449 , because
it would take far too much code for an exceptional case.
2018-08-06 19:35:47 +02:00
Benno Schulenberg
ad79a4fcfb
rcfile: ensure that in the yesno menu Cancel is bound to some keystroke
...
(In the Search and Replace menus Cancel is not essential. And in the
Goto Line menu Cancel is not needed at all: a simple <Enter> after an
empty answer works fine.)
This fixes the second part of https://savannah.gnu.org/bugs/?54447 .
2018-08-05 20:11:48 +02:00
Benno Schulenberg
e90b7cf4aa
tweaks: elide an unneeded/duplicate variable
2018-08-04 11:34:44 +02:00
Benno Schulenberg
bb90de0eb4
tweaks: rename a constant, to match what it actually means
...
Wrapping is concerned with columns, not with number of characters.
2018-08-04 11:21:42 +02:00
Benno Schulenberg
157c7b1bc4
rcfile: explicitly check for disallowed keywords in included files
...
This fixes https://savannah.gnu.org/bugs/?54441 .
2018-08-04 07:29:36 +02:00
Benno Schulenberg
9a47a9c4c0
rcfile, docs: no longer recognize nor mention 'set backwards'
...
The option has been a no-op since 2.9.0. And now that the
^W/^Q/M-W/M-Q set is available, 'set backwards' is entirely
outdated.
2018-07-29 21:00:12 +02:00
Benno Schulenberg
f2adefb158
tweaks: drop some old debugging code
2018-07-08 10:45:43 +02:00
Benno Schulenberg
7ae8f3bca4
tweaks: elide a function that is used just once
2018-07-08 10:40:22 +02:00
Benno Schulenberg
2e1e157967
copyright: update the years for significantly changed files
2018-06-01 10:18:32 +02:00
David Lawrence Ramsey
fce54a724d
tweaks: fix some grammar plus a typo in the comments
2018-05-27 20:19:46 +02:00
Benno Schulenberg
119a6f0de3
rcfile: don't crash when a bind to a string lacks the closing quote
...
This fixes https://savannah.gnu.org/bugs/?53972 .
Reported-by: Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
2018-05-25 13:15:52 +02:00
Benno Schulenberg
c07586d9f3
tweaks: condense some repetitious comments, and check before assigning
...
Check that the option argument is okay (contains no blank characters),
before assigning it to the relevant variable.
2018-05-24 20:49:29 +02:00
Benno Schulenberg
f5eeb92f40
tweaks: sort an option better, and reschedule a removal
2018-05-13 09:47:40 +02:00
Mark-Weston
858663444e
new feature: an option to make the 'nextword' function stop at word ends
...
When 'afterends' is set and Ctrl+Right or Shift+Ctrl+Right is pressed,
nano will stop at the ends of words instead of their beginnings.
Signed-off-by: Mark-Weston <markweston@cock.li>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2018-05-10 11:32:01 +02:00
Benno Schulenberg
bf8bd02558
build: do not prefix an alternative rcfilename with a dot
...
When the user configures nano with --enable-altrcname=name,
the specified name should not be prefixed with a dot.
This fixes https://savannah.gnu.org/bugs/?53694 .
Reported-by: Cody A. Taylor <codemister99@yahoo.com>
2018-04-21 10:03:30 +02:00
Benno Schulenberg
0b30835dd0
tweaks: use meaningful names instead of puzzling values
...
Suggested-by: Brand Huntsman <alpha@qzx.com>
2018-04-01 09:49:58 +02:00
Benno Schulenberg
0cd833e64b
tweaks: move a function to its proper location
...
Put it after the function that it calls, and before the functions
it is called from.
2018-03-30 10:34:40 +02:00
Benno Schulenberg
cbf226476d
rcfile: skip color commands where some color name is invalid
...
That is, do not fall back to the default background color when the
name for the background color is invalid, but reject the entire
color command, just like for an invalid foreground color.
2018-03-30 10:30:55 +02:00
Benno Schulenberg
570fb6c606
small addition: understand color name "normal" to mean the default color
...
This allows a syntax to remove the color from things that were colored
overeagerly by earlier regexes.
2018-03-28 14:03:22 +02:00
David Lawrence Ramsey
7b1f3f4fe7
tweaks: correct several parameter types
...
This avoids a bunch of warnings when compiled with -pedantic:
ISO C forbids comparison of ‘void *’ with function pointer
2018-03-18 20:01:25 +01:00
Benno Schulenberg
a1be8b6a19
tweaks: condense a comment and elide an 'if'
2018-03-01 11:18:56 +01:00
Benno Schulenberg
de4fbadf20
tweaks: reshuffle some code, to be slightly less ugly
2018-03-01 11:08:13 +01:00
Benno Schulenberg
bdd8920081
bindings: make a key defined as string work also in browser and viewer
2018-03-01 10:55:04 +01:00
Benno Schulenberg
5eccaa7633
tweaks: refactor the implanting of a key expansion
2018-02-27 13:34:32 +01:00
Benno Schulenberg
c757aee235
tweaks: correct a typo that broke binding a key to a string
...
Commit 0cf455bc
introduced the typo.
2018-02-27 10:28:52 +01:00
Benno Schulenberg
ffebd31cbb
tweaks: shorten the name of two record elements
...
Exclude the confusing, pleonastic 'sc' abbreviation from their names.
2018-02-24 19:31:11 +01:00
Benno Schulenberg
b027263a37
small addition: allow customizing the color of an error message
...
The new option 'set errorcolor' allows the user to specify the color
combination for the status bar when an error message is displayed.
2018-02-23 12:35:17 +01:00
Benno Schulenberg
0cf455bc48
build: fix compilation when configured with --enable-tiny
...
And when configured with --enable-tiny --enable-nanorc.
2018-02-14 19:29:29 +01:00
Benno Schulenberg
3e1fc6385b
syntaxes: remove quotes from each syntax name, and color it differently
...
The different color will make the name stand out, as it should, instead
of looking the same as all the regex strings.
2018-02-14 17:36:50 +01:00
Benno Schulenberg
544cda6a62
rcfile: allow a syntax name to be unquoted
2018-02-14 17:35:37 +01:00
Benno Schulenberg
467cc8edf3
tweaks: remove two deprecated options and six rebindable function names
...
This addresses https://savannah.gnu.org/bugs/?48992 .
2018-02-04 13:51:13 +01:00
Benno Schulenberg
6d111c9343
new feature: allow binding a key to a string (in a nanorc file)
...
In this way a single keystroke can produce a fragment of text or a
series of commands, or a mix of the two. It is like a prerecorded
macro.
This fulfills https://savannah.gnu.org/bugs/?52931 .
2018-02-04 12:44:12 +01:00
Benno Schulenberg
7b9bd65362
tweaks: drop a useless assert, and don't abort over an unhandled option
2018-01-24 10:29:50 +01:00
Benno Schulenberg
f72fecee9b
copyright: update the years for the FSF
...
And one for me, for the much changed keyboard stuff.
2018-01-24 10:14:43 +01:00
Benno Schulenberg
d85098abda
tweaks: reshuffle a couple of lines, to make a bit more sense
2018-01-19 20:27:53 +01:00
Benno Schulenberg
13f8ddcaf2
tweaks: remove a handful of redundant (because always true) asserts
...
And rewrap some lines, three of them to make them equal to another.
2018-01-19 20:09:06 +01:00
Benno Schulenberg
37e9ada964
tweaks: change a 'do' to a 'while', and return early to elide an 'if'
2018-01-19 18:05:24 +01:00
Benno Schulenberg
a99158c7c0
tweaks: remove a fragment of dead code
...
At that point, ptr will necessarily point at EOL -- *ptr == '\0'.
2018-01-19 17:56:17 +01:00
Benno Schulenberg
704a7d7b4f
tweaks: rename two variables, for preciseness and shortness
...
Also remove an unneeded nulling.
2018-01-15 16:38:13 +01:00
Benno Schulenberg
64366d9992
startup: make an error message succinct and to the point
...
The verbosity "hid" the really relevant information:
filename, line number, and the error message.
Valid values and other details can be found in the manual pages.
2018-01-15 13:24:14 +01:00
Benno Schulenberg
bd97ae7255
tweaks: set a modifier in a single place, for conciseness
2018-01-15 13:15:23 +01:00
Benno Schulenberg
2ff398c685
tweaks: reshuffle some stuff, and avoid a memory leak
2018-01-15 13:07:42 +01:00