mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 06:39:43 +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.
25 lines
536 B
Plaintext
25 lines
536 B
Plaintext
## Syntax highlighting for Makefiles.
|
|
|
|
syntax makefile "(/((GNU)?m|M)akefile[^/]*$|\.(make|mk)$)"
|
|
magic "makefile script"
|
|
comment "#"
|
|
|
|
# Assignments.
|
|
color red " (:?:|\+|\?)?= "
|
|
|
|
# Keywords.
|
|
color magenta "^(if|ifn?def|ifn?eq|else|endif|(-|s)?include)\>"
|
|
color magenta "^((override +)?(un)?define|endef|(un)?export|private|vpath)\>"
|
|
|
|
# Variable expansions.
|
|
color blue "\$+[{(][a-zA-Z0-9_-]+[})]"
|
|
|
|
# Targets.
|
|
color brightblue "^[^ ]+:"
|
|
|
|
# Comments.
|
|
color green "(^|[[:blank:]]+)#.*"
|
|
|
|
# Trailing whitespace.
|
|
color ,green "[[:space:]]+$"
|