mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
c02aec557c
When opening a nonexistent file with nano, it likely consists of only a name without any path component, and thus without any slash. So when a file regex checks for a slash, it should check also for start-of-string. This fixes https://savannah.gnu.org/bugs/?65591. Problem existed for the Makefile since version 2.9.8, commit22663f8a
, and for .profile since version 3.0, commit4a268678
(but earlier, nano did not recognize .profile files at all).
27 lines
552 B
Plaintext
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 "\$+[{(][a-zA-Z0-9_-]+[})]"
|
|
|
|
# Targets.
|
|
color brightblue "^[^ ]+:"
|
|
|
|
# Comments.
|
|
color green "(^|[[:blank:]]+)#.*"
|
|
|
|
# Trailing whitespace.
|
|
color ,green "[[:space:]]+$"
|