Plus one that automake recognizes: if. Color them only at the start
of a line. Also color all possible assignment sequences (surrounded
by spaces to not color the ones in shell fragments), and add some
comments.
Recognize not just "Makefile" but also "makefile" and "GNUmakefile".
And recognize these only when they are the full filenames, not when
they are the tail part of a longer name.
Signed-off-by: Cristian Caloghera <cristi.caloghera@gmail.com>
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>
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>
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>
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>
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>
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.
It's better to color some invalid things as if valid than the other
way around. So, as strings can validly contain any number of double
quotes, just accept *anything* between the delimiting double quotes
and demand that the closing quote is followed by whitespace or EOL.
Since file-5.10 (end of 2011), libmagic identifies a C file in most
cases as "C source" instead of as "C program". Nano's magic strings
for some other files didn't match any more what file-5.32 currently
produces, either. So, they have been adjusted, new ones added, and
old ones deleted.
This fixes https://savannah.gnu.org/bugs/?52445.
The succeeding character was needed to avoid miscolorings due to nano
getting confused about starts and ends. But since commit 7ef5c532,
nano should be getting the starts and ends always right, so... undo
"temporary" commit 7b2ea405 from two years ago.
This addresses https://savannah.gnu.org/bugs/?51526.
Reported-by: <exodus6395@googlemail.com>
The new option 'set selectedcolor' applies to marked text, to the
currently selected file in the file browser, and to the highlighted
match during interactive search-and-replace.