The file contained two syntaxes (each of them fairly large) that are
useful only for Gentoo users. I don't think the file should have been
distributed with nano ever, as the syntaxes are just a dead weight for
the users of all other distributions.
Also, trim some whitespace and group one rule better.
Also, fix a stray closing parenthesis in the JSON syntax,
and add the missing slash to the possible escaped characters.
(Reference: https://www.json.org/json-en.html.)
Also, improve the ending of multiline strings in the Rust syntax.
A backslash should not be allowed inside a quoted string unless
it is used to escape another character.
This fixes https://savannah.gnu.org/bugs/?61389.
Bug existed since each of these syntaxes was introduced.
(Awk and Fortran do not know include files with names between
angled brackets, so those regexes are dropped in the bargain.)
Quoted strings cannot start within another quoted string and end after
that other string has ended. Therefore single-quoted and double-quoted
strings should (as much as possible) be colorized by a single rule, so
that overlapping colorations are avoided.
(This also fixes a double typo in the PHP syntax (\. --> \\.) that has
been there since the PHP syntax was added in 2008, commit 90ee8ee4.)
This fixes https://savannah.gnu.org/bugs/?61387.
Bug existed since each of these syntaxes was introduced,
the oldest ones around 2006, a few others around 2015.
The one that got it right was the Lua syntax from 2011.
Within a bracket expression, the backslash is not special,
so it does not need to be escaped.
The double backslashes within brackets were found with:
grep -o '\[[^][]*\\\\[^][]*\]' syntax{,/extra}/*rc
Also, incorporate the square brackets into some bracket expressions
by listing the closing bracket first, saving a separate regex for
those two brackets.
Removals:
- All eblits were dropped from Gentoo years ago.
- HDEPEND was never fully approved, superseded by BDEPEND.
- Keywords 'dohard' and 'dosed' have been banned since EAPI 4:
https://projects.gentoo.org/pms/5/pms.html#x1-130001r8
- Several arches are dead. For the currently supported list:
https://gitweb.gentoo.org/repo/gentoo.git/tree/profiles/arch.list
Additions:
- Two eapply functions replace the epatch functions, but epatch
is still supported until EAPI 6 is banned.
- Modern build systems (ninja and qmake5) have new functions.
- EAPI 7 added more builtins: dostrip, get_libdir, ver_*
- Highlight the cross-compiler boolean function. (There are too
many toolchain functions to add them all, but this one is very
common and has a long name, so highlighting it is useful for
catching typos early.)
The EAPI documentation:
https://projects.gentoo.org/pms/8/pms.html#x1-590007
An extensive write-up on EAPI 7:
https://mgorny.pl/articles/the-ultimate-guide-to-eapi-7.html
Signed-off-by: David Michael <fedora.dm0@gmail.com>
Add IDEPEND from EAPI 8, and also add more EAPI 7 roots so that all
of ROOT, EROOT, SYSROOT, ESYSROOT, and BROOT are supported.
Signed-off-by: David Michael <fedora.dm0@gmail.com>
Fortran and POV-Ray files are not found on any regular install of a
Unixy system nor in common software packages. People who want these
syntaxes will have to make a little effort to enable them.