nano/syntax/makefile.nanorc
Benno Schulenberg 2181853574 syntaxes: use character classes instead of range expressions
In some locales certain normal ASCII characters are not included in
the ranges [A-Z] and [a-z].  So, use [[:upper:]] and [[:lower:]]
instead, and [[:alpha:]] for [A-Za-z], and similarly for others.

This fixes https://savannah.gnu.org/bugs/?67094.
2025-05-08 10:24:49 +02:00

27 lines
552 B
Plaintext

## Syntax highlighting for Makefiles.
syntax makefile "(^|/)((GNU)?m|M)akefile[^/]*$|\.(make|mk)$"
magic "makefile script"
tabgives " "
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 "\$+[{(][[:alnum:]_-]+[})]"
# Targets.
color brightblue "^[^ ].*:"
# Comments.
color green "(^|[[:blank:]]+)#.*"
# Trailing whitespace.
color ,green "[[:space:]]+$"