commit e873121372c0312e5c587497b599cb0a5fa87dfc
parent ad52830fb8eefba053ff3ee12f9e853fc3cbfea1
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 23 Feb 2020 17:00:23 +0100
syntax: spec: add two missing % signs, and colorize also "%triggerprein"
Furthermore, actually colorize the header line of a %changelog entry,
and remove two redundant fragments and simplify their overrides.
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/syntax/spec.nanorc b/syntax/spec.nanorc
@@ -9,15 +9,15 @@ color brightblue "((BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch)[[:sp
color brightblue "((Conflicts|Obsoletes|Provides|Requires|Requires\(.*\)|Enhances|Suggests|BuildConflicts|BuildRequires|Recommends|PreReq|Supplements)[[:space:]]*:)"
color brightblue "((Epoch|Serial|Nosource|Nopatch)[[:space:]]*:)"
color brightblue "((AutoReq|AutoProv|AutoReqProv)[[:space:]]*:)"
-color brightblue "((Copyright|License|Summary|Summary\(.*\)|Distribution|Vendor|Packager|Group|Source\d*|Patch\d*|BuildRoot|Prefix)[[:space:]]*:)"
+color brightblue "((Copyright|License|Summary|Summary\(.*\)|Distribution|Vendor|Packager|Group|BuildRoot|Prefix)[[:space:]]*:)"
color brightblue "((Name|Version|Release|Url|URL)[[:space:]]*:)"
-color brightblue start="^Source" end=":" start="^Patch" end=":"
+color brightblue "\<(Source|Patch)[0-9]*[[:space:]]*:"
# Architectures.
color brightred "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)"
# Architecture conditionals.
-color brightred "(ifarch|ifnarch|elifarch)"
+color brightred "%(ifarch|ifnarch|elifarch)"
# OS conditionals.
-color brightred "(ifos|ifnos|elifos)"
+color brightred "%(ifos|ifnos|elifos)"
# %* strings.
color green "%([A-Z_a-z_0-9_]*)"
color magenta "%_([A-Z_a-z_0-9_]*)"
@@ -26,7 +26,7 @@ color magenta start="%\{" end="\}"
color yellow start="%\{__" end="\}"
# Sections.
color red "^%(build$|changelog|check$|clean$|description|files|install$|package|pre|prep$|pretrans|preun)"
-color red "^%(post|posttrans|postun|trigger|triggerin|triggerpostun|triggerun|verifyscript)"
+color red "^%(post|posttrans|postun|trigger|triggerprein|triggerin|triggerun|triggerpostun|verifyscript)"
color red "^%(filetriggerin|filetriggerpostun|filetriggerun|transfiletriggerin|transfiletriggerpostun|transfiletriggerun)"
color red "^%(sourcelist|patchlist|generate_buildrequires)"
# Conditionals and defines.
@@ -37,7 +37,7 @@ color cyan "#.*"
color cyan "%dnl[[:space:]].*"
# Special case: "# norootforbuild" is handled as main tag.
color brightblue "^# norootforbuild"
-# %changelog date entries.
-color brightyellow "^\* .*\)$"
+# Date-plus-author headers of %changelog entries.
+color brightyellow "^\* .+>"
# Trailing whitespace.
color ,green "[[:space:]]+$"