]> git.wh0rd.org Git - nano.git/commitdiff
2011-03-28 Asterios Dramis <asterios.dramis@gmail.com>
authorChris Allegretta <chrisa@asty.org>
Tue, 29 Mar 2011 04:10:11 +0000 (04:10 +0000)
committerChris Allegretta <chrisa@asty.org>
Tue, 29 Mar 2011 04:10:11 +0000 (04:10 +0000)
        * doc/syntax/spec.nanorc: New RPM spec file highlighting file

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4542 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
doc/syntax/Makefile.am
doc/syntax/spec.nanorc [new file with mode: 0644]

index 70e52926a8e94f75c2fac9c9431090872bd22db2..3ea49514bb42bb1d673299a0f74fc9544408d0d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2011-03-28 Asterios Dramis <asterios.dramis@gmail.com>
+       * doc/syntax/spec.nanorc: New RPM spec file highlighting file 
+
 2011-03-12 Chris Allegretta <chrisa@asty.org>
        * po/*: Sync latest translation fixes, add an update_linguas.sh script.  Rename
          existing update.pl to update_sources.pl to make it more specific.
@@ -25,7 +28,7 @@ GNU nano 2.3.0 - 2011.02.26
 
 2011-02-22 Chris Allegretta <chrisa@asty.org>
        * color.c (nfreeregex): Fix that we were trying to set the pointer passed by value
-         to NULL.  Fixes crashes on file save reported by Ken Tyler and Matthieu Lejeune.
+         to NULL.  Fixes crashes on file save reported by Ken Tyler and Matthieu Lejeune. 
 
 2011-02-18 Chris Allegretta <chrisa@asty.org>
        * New saved cursor position history option.  Command line option -P or --poslog, rc file
index 372ddb2447788b4d5eab01f821522015ec777f97..4d52039ca0b2ec9eb7d03ed482407243fdcca87d 100644 (file)
@@ -25,6 +25,7 @@ pkgdata_DATA =        asm.nanorc \
                objc.nanorc \
                fortran.nanorc \
                makefile.nanorc \
-               mgp.nanorc
+               mgp.nanorc \
+               spec.nanorc
 
 EXTRA_DIST = $(pkgdata_DATA)
diff --git a/doc/syntax/spec.nanorc b/doc/syntax/spec.nanorc
new file mode 100644 (file)
index 0000000..f4afb1b
--- /dev/null
@@ -0,0 +1,38 @@
+# RPM spec files syntax highlighting
+# Parts taken from kate (KDE) syntax highlighting
+# Asterios Dramis
+syntax "spec" "\.(spec$|spec\.*)"
+# Main tags
+color brightblue "((Icon|ExclusiveOs|ExcludeOs)[[:space:]]*:)"
+color brightblue "((BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch)[[:space:]]*:)"
+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 "((Name|Version|Release|Url|URL)[[:space:]]*:)"
+color brightblue start="^Source" end=":" start="^Patch" end=":"
+# 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)"
+# Architectures conditionals
+color brightred "(ifarch|ifnarch)"
+# OS conditionals
+color brightred "(ifos|ifnos)"
+# %* strings
+color green "%([A-Z_a-z_0-9_]*)"
+color magenta "%_([A-Z_a-z_0-9_]*)"
+color yellow start="%__" end="\ "
+color magenta start="%\{" end="\}"
+color yellow start="%\{__" end="\}"
+# Sections
+color red "^%(build$|changelog|check$|clean$|description|files|install$|package|pre|prep$|preun|post|postun)"
+color red "^%(trigger|triggerin|triggerpostun|triggerun|verifyscript)"
+# Conditionals and Defines
+color brightred "%(if|else|endif|define|global|undefine)"
+# Comments
+color cyan "#.*$"
+# "# norootforbuild" is handled as main tag
+color brightblue "^# norootforbuild"
+# %changelog date entries
+color brightyellow "^\* .*\)$"
+# Trailing whitespace
+color ,green "[[:space:]]+$"