mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
544351f3be
In many places a carriage return is not valid whitespace and should thus not be colored as such. In some of these places a vertical tab or form feed is maybe valid whitespace, but it would be ugly or even wrong to color them because they are not part of the subsequent comment or keyword. This fixes https://savannah.gnu.org/bugs/?60456.
36 lines
638 B
Plaintext
36 lines
638 B
Plaintext
## Syntax highlighting for Autoconf.
|
|
|
|
## Original author: Benno Schulenberg
|
|
## License: GPL version 3 or newer
|
|
|
|
syntax autoconf "\.(ac|m4)$"
|
|
comment "#"
|
|
|
|
# Keywords:
|
|
color yellow "\<(if|test|then|elif|else|fi|for|in|do|done)\>"
|
|
color yellow "=|!=|&&|\|\|"
|
|
|
|
# Macros:
|
|
color cyan "\<[[:upper:]_[:digit:]]+\>"
|
|
|
|
# Version numbers:
|
|
color red "\<[-_.0-9]+\>"
|
|
|
|
# Strings:
|
|
color red ""[^"]*"" "'[^']*'"
|
|
|
|
# Backticks:
|
|
color green "`[^`]*`"
|
|
|
|
# Error lines:
|
|
color brightred "^[[:blank:]]*\*\*\*.*"
|
|
|
|
# Brackets:
|
|
color magenta "\[|\]|\(|\)"
|
|
|
|
# Comments:
|
|
color blue "^[[:blank:]]*#.*" "\<dnl.*"
|
|
|
|
# Trailing whitespace:
|
|
color ,green "[[:space:]]+$"
|