mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 21:01:24 +03:00
bacb0f717d
Since file-5.10 (end of 2011), libmagic identifies a C file in most cases as "C source" instead of as "C program". Nano's magic strings for some other files didn't match any more what file-5.32 currently produces, either. So, they have been adjusted, new ones added, and old ones deleted. This fixes https://savannah.gnu.org/bugs/?52445.
27 lines
592 B
Plaintext
27 lines
592 B
Plaintext
## Here is an example for patch files.
|
|
|
|
syntax "patch" "\.(patch|diff|debdiff)$"
|
|
magic "diff output"
|
|
# There is no official support for comments in patch files.
|
|
comment ""
|
|
|
|
# Added lines.
|
|
color brightgreen "^\+.*"
|
|
# Show trailing whitespace only on added lines.
|
|
color ,green "[[:space:]]+$"
|
|
# Context lines.
|
|
color brightblue "^ .*"
|
|
# Deleted lines.
|
|
color brightred "^-.*"
|
|
|
|
# Header lines.
|
|
color magenta "^(Index:|diff)[[:blank:]].*"
|
|
# File names and dates.
|
|
color red "^---.*"
|
|
color green "^\+\+\+.*"
|
|
# Line numbers.
|
|
color brightyellow "^@@.*"
|
|
|
|
# Statistics.
|
|
color cyan start="^---$" end="^$"
|