Benno Schulenberg
e3b13ae124
tweaks: reshuffle a couple of lines
2018-01-09 16:52:42 +01:00
Benno Schulenberg
e5440b390e
replacing: don't skip the first character of a backwards-marked region
...
Also, when replacing forwards, do not first skip the occurrence at the
cursor and then replace it at the end of the cycle, but begin with it,
as one would expect.
This fixes https://savannah.gnu.org/bugs/?52789
and fixes https://savannah.gnu.org/bugs/?52791 .
2018-01-09 16:52:42 +01:00
Benno Schulenberg
2a17527381
tweaks: indenting text files with tabs is not a good idea
...
The tabsize can vary by configuring editor or viewer, but
the text has some kind of intended alignment.
Also, change the indentation a bit, to make things line up
more neatly.
2018-01-09 16:51:16 +01:00
Benno Schulenberg
8067efa6cc
syntax: nanohelp: color also the Sh-Tab key combo
2018-01-09 16:34:31 +01:00
Benno Schulenberg
0bb6c0234f
tweaks: condense the conditional compilation of shortcut reassignments
...
These three functions are needed only when both linter and speller
are available.
2018-01-09 13:31:58 +01:00
Benno Schulenberg
7947d9d2a5
build: fix compilation when configured with --enable(tiny,color,nanorc}
...
This fixes https://savannah.gnu.org/bugs/?52834 .
Reported-by: <akiko@mailbox.org>
2018-01-09 13:30:25 +01:00
Benno Schulenberg
c9ccb39752
tweaks: fully include Savefile and Wherewas in the tiny version
...
If help is enabled, those functions should be described too,
and if nanorc is enabled, they should both be rebindable.
2018-01-09 11:49:21 +01:00
Benno Schulenberg
ada78dc89d
build: fix compilation with --enable-tiny --enable-justify
2018-01-08 19:12:41 +01:00
Benno Schulenberg
c6f367268b
syntax: lua: do not color debug.setinfo as it doesn't exist
...
Reported-by: Tom Levy <tomlevy93@gmail.com>
2018-01-06 17:59:28 +01:00
Benno Schulenberg
084dda3837
po: update translations and regenerate POT file and PO files
2018-01-02 16:07:04 +01:00
Benno Schulenberg
30f367e0db
bump version numbers and add a news item for the 2.9.2 release
2018-01-02 15:51:12 +01:00
Benno Schulenberg
5965e80a38
tweaks: fold some regexes into one another, for conciseness
...
The anchored "^texture" appears to have been a mistake.
Inspired-by: Tom Levy <tomlevy93@gmail.com>
2018-01-01 16:00:18 +01:00
Tom Levy
a794c3318b
syntax: go: sign of exponent in number literal is optional
...
Signed-off-by: Tom Levy <tomlevy93@gmail.com>
2018-01-01 15:27:31 +01:00
Tom Levy
d04b0c123e
syntax: go: fix word boundary before dot in number literal
...
The fragment "\<\." can never match anything because \< matches the
beginning of a word but "." is not a word character.
Replace \< with \B (the empty string not at the edge of a word).
Signed-off-by: Tom Levy <tomlevy93@gmail.com>
2018-01-01 15:25:26 +01:00
Benno Schulenberg
21cd953e85
syntax: lua: condense some regexes, tweak comments, reorder things
...
Also remove some redundant backslashes and parentheses.
2018-01-01 14:59:00 +01:00
Tom Levy
058b9da9b9
syntax: lua: add new and missing standard library functions
...
The list now includes all the Lua 5.3 functions listed on
https://www.lua.org/manual/5.3/#index .
Also, remove the coloring of just the library name, so that
only known library functions get highlighted.
Signed-off-by: Tom Levy <tomlevy93@gmail.com>
2018-01-01 14:35:19 +01:00
Tom Levy
38a10a62d0
syntax: lua: support fractional part and exponent for decimal and hex
...
As of Lua 5.2: "Hexadecimal constants also accept an optional fractional
part plus an optional binary exponent, marked by a letter 'p' or 'P'"
(see at the end of https://www.lua.org/manual/5.2/manual.html#3.1 ).
The new regexes do not match a leading nor a trailing dot, but they
are good enough. Discussion on the mailing list:
https://lists.gnu.org/archive/html/nano-devel/2017-12/msg00121.html
Signed-off-by: Tom Levy <tomlevy93@gmail.com>
2018-01-01 14:15:14 +01:00
Tom Levy
091e8faf6d
syntax: lua: require at least one digit for hexadecimal numbers
...
Since a "0x" by itself is invalid. Also add word boundaries, so that
e.g. "00x1" (which is invalid) does not get partial highlighting.
Also remove some redundant backslashes from the strings regex.
Signed-off-by: Tom Levy <tomlevy93@gmail.com>
2018-01-01 13:51:10 +01:00
Benno Schulenberg
d8ea89f6a6
gnulib: update to its current upstream state
2017-12-31 10:21:52 +01:00
Benno Schulenberg
1f48ed0412
syntaxes: remove redundant word-boundary markers
2017-12-30 17:32:15 +01:00
Benno Schulenberg
b18bcbbe9f
tweaks: use for git the more faithful "less -x1,5" suggested by Brand
2017-12-30 16:38:19 +01:00
Benno Schulenberg
920730f1aa
tweaks: use spaces for alignment also in the THANKS file
2017-12-30 16:34:12 +01:00
Benno Schulenberg
9506b51101
docs: say thanks to some fairly recent translators, and rename one
2017-12-30 16:27:58 +01:00
Benno Schulenberg
918d0e71ab
docs: mention that the source code is best viewed with a tab size of 4
2017-12-30 11:47:22 +01:00
Benno Schulenberg
484a199175
tweaks: convert the indentation of the NEWS file too
...
To keep the blocks of text more-or-less aligned.
2017-12-30 11:31:49 +01:00
Benno Schulenberg
17429d7f38
tweaks: fix some whitespace errors, and convert alignment tabs to spaces
2017-12-29 21:35:14 +01:00
Benno Schulenberg
87206c0607
tweaks: convert the indentation to use only tabs
...
Each leading tab is converted to two tabs, and any leading four spaces
is converted to one tab. The intended tab size (for keeping most lines
within 80 columns) is now four.
2017-12-29 20:06:50 +01:00
Benno Schulenberg
b574f73e60
tweaks: add a separate function that actually wipes the status bar
2017-12-29 17:40:41 +01:00
Benno Schulenberg
eac90c3eff
prompt: blank the bar when a "continue?" is answered with No or ^C
...
This fixes https://savannah.gnu.org/bugs/?52755 .
Reported-by: Brand Huntsman <alpha@qzx.com>
2017-12-29 17:01:15 +01:00
Benno Schulenberg
440a128d25
indenting: keep affecting last line of marked region if it was at first
...
When unindenting/uncommenting affected the bottom line of the marked
region, keep affecting this line also during subsequent consecutive
indenting/commenting.
This fixes https://savannah.gnu.org/bugs/?52718 .
2017-12-29 16:52:17 +01:00
Tom Levy
4f2b01c7e5
syntax: lua: correct the word boundaries on standard library functions
...
Functions such as "io.close" should only be highlighted when the
package name ("io") is a word by itself, otherwise code such as
"fooio.close" gets unexpected partial highlighting.
Signed-off-by: Tom Levy <tomlevy93@gmail.com>
2017-12-28 21:46:26 +01:00
Benno Schulenberg
12073001c2
tweaks: condense, reword, and rewrap a bunch of comments
2017-12-26 22:14:25 +01:00
Benno Schulenberg
4c20135749
help: swap the order of the Complete and Comment functions
...
So that Commenting comes closer to the somewhat related Indenting
and Unindenting functions.
2017-12-26 21:36:29 +01:00
Benno Schulenberg
f9ebf038e0
tweaks: slightly rename four functions, for aptness and variety
2017-12-26 14:15:49 +01:00
David Lawrence Ramsey
62ebd93579
tweaks: use printf's z modifier for (s)size_t, instead of casting
2017-12-26 14:11:18 +01:00
Benno Schulenberg
a10fdc3fb1
help: show that "Tab" will indent, just like "Sh-Tab" will unindent
...
Also, make the descriptions for indenting/unindenting more precise.
2017-12-26 13:46:34 +01:00
Benno Schulenberg
8581e702d6
tweaks: move some frequently-used keystrokes to the top of the list
...
So they will be found quicker.
Also fold two assignments into one.
2017-12-26 13:31:50 +01:00
Benno Schulenberg
bdbd5ff0e7
syntax: javascript: add some comments, and color explicit numbers too
2017-12-25 16:03:05 +01:00
Benno Schulenberg
f769465284
syntax: javascript: add some keywords, and sort them more logically
...
Also, remove angle-bracketed "strings" -- they don't exist.
2017-12-25 15:40:05 +01:00
Benno Schulenberg
1b5b52d2e4
syntax: javascript: color strings differently from major keywords
...
Also, remove the coloring of special single-quoted strings as they
get recolored by the subsequent general string-coloring command.
And remove the coloring of all-uppercase words, as other editors
do not color those either.
2017-12-25 15:36:35 +01:00
Benno Schulenberg
ab62d28817
syntax: javascript: require that a comment is preceded by whitespace
...
Either by whitespace or by the start of a line.
This avoids treating part of a URL as a comment.
2017-12-25 15:25:04 +01:00
Mike Frysinger
8e0a7ec20d
syntax: javascript: add newer keywords and string syntax
2017-12-25 15:08:03 +01:00
Benno Schulenberg
23d66949e1
tweaks: frob four comments, and rewrap two lines
2017-12-24 11:53:38 +01:00
Benno Schulenberg
184bb11fd9
tweaks: factor out a piece of common code
2017-12-24 11:25:10 +01:00
Benno Schulenberg
a70db34fc9
tweaks: remove two irrelevant conditions
...
They were mistakenly added by changeset fb85c055
, four commits ago.
2017-12-24 11:10:41 +01:00
Benno Schulenberg
fbde1b2d71
tweaks: reshuffle another bit of code, for conciseness
2017-12-24 10:56:16 +01:00
Benno Schulenberg
c22fef18e4
tweaks: reshuffle a bit of common code, moving it to an existing function
2017-12-23 21:50:18 +01:00
Benno Schulenberg
ee5b250b66
indenting: don't exclude last line of region when region is empty
...
This fixes https://savannah.gnu.org/bugs/?52717 .
2017-12-23 11:42:25 +01:00
Benno Schulenberg
fb85c05594
text: keep cursor at left edge when it IS there when indenting/commenting
...
Suggested-by: Brand Huntsman <alpha@qzx.com>
2017-12-21 19:47:22 +01:00
Benno Schulenberg
25b1114e03
tweaks: elide two parameters from the get_region() function
2017-12-21 19:47:22 +01:00