* [gentoo-commits] gentoo-syntax r71 - in trunk/gentoo-syntax: . ftdetect syntax
@ 2010-04-05 19:46 Dror Levin (spatz)
0 siblings, 0 replies; only message in thread
From: Dror Levin (spatz) @ 2010-04-05 19:46 UTC (permalink / raw
To: gentoo-commits
Author: spatz
Date: 2010-04-05 19:46:05 +0000 (Mon, 05 Apr 2010)
New Revision: 71
Added:
trunk/gentoo-syntax/syntax/gentoo-package-license.vim
trunk/gentoo-syntax/syntax/gentoo-package-properties.vim
Modified:
trunk/gentoo-syntax/Makefile
trunk/gentoo-syntax/ftdetect/gentoo.vim
trunk/gentoo-syntax/syntax/gentoo-make-conf.vim
Log:
Add support for package.{license,properties} and ACCEPT_{LICENSE,PROPERTIES}, bug 281481.
Modified: trunk/gentoo-syntax/Makefile
===================================================================
--- trunk/gentoo-syntax/Makefile 2010-04-01 22:10:31 UTC (rev 70)
+++ trunk/gentoo-syntax/Makefile 2010-04-05 19:46:05 UTC (rev 71)
@@ -47,7 +47,9 @@
syntax/gentoo-metadata.vim \
syntax/gentoo-mirrors.vim \
syntax/gentoo-package-keywords.vim \
+ syntax/gentoo-package-license.vim \
syntax/gentoo-package-mask.vim \
+ syntax/gentoo-package-properties.vim \
syntax/gentoo-package-use.vim \
syntax/gentoo-use-desc.vim \
syntax/glep.vim \
Modified: trunk/gentoo-syntax/ftdetect/gentoo.vim
===================================================================
--- trunk/gentoo-syntax/ftdetect/gentoo.vim 2010-04-01 22:10:31 UTC (rev 70)
+++ trunk/gentoo-syntax/ftdetect/gentoo.vim 2010-04-05 19:46:05 UTC (rev 71)
@@ -62,6 +62,14 @@
au BufNewFile,BufRead {*/package.use,*/portage/package.use/*}
\ set filetype=gentoo-package-use
+" package.license
+au BufNewFile,BufRead {*/package.license,*/portage/package.license/*}
+ \ set filetype=gentoo-package-license
+
+" package.properties
+au BufNewFile,BufRead {*/package.properties,*/portage/package.properties/*}
+ \ set filetype=gentoo-package-properties
+
" thirdpartymirrors
au BufNewFile,BufRead {*/thirdpartymirrors,*/portage/mirrors}
\ set filetype=gentoo-mirrors
Modified: trunk/gentoo-syntax/syntax/gentoo-make-conf.vim
===================================================================
--- trunk/gentoo-syntax/syntax/gentoo-make-conf.vim 2010-04-01 22:10:31 UTC (rev 70)
+++ trunk/gentoo-syntax/syntax/gentoo-make-conf.vim 2010-04-05 19:46:05 UTC (rev 71)
@@ -17,7 +17,7 @@
runtime syntax/gentoo-common.vim
-syn cluster GentooMakeConfEC add=GentooMakeConfEUse,GentooMakeConfEAK,GentooMakeConfECFLAGS,GentooMakeConfELDFLAGS,GentooMakeConfEMAKEOPTS,GentooMakeConfECHOST,GentooMakeConfEFEATURES,GentooMakeConfEMISC,GentooMakeConfEMISCK,GentooMakeConfEMISCKE,GentooMakeConfEMISCN
+syn cluster GentooMakeConfEC add=GentooMakeConfEUse,GentooMakeConfEAK,GentooMakeConfEAL,GentooMakeConfEAP,GentooMakeConfECFLAGS,GentooMakeConfELDFLAGS,GentooMakeConfEMAKEOPTS,GentooMakeConfECHOST,GentooMakeConfEFEATURES,GentooMakeConfEMISC,GentooMakeConfEMISCK,GentooMakeConfEMISCKE,GentooMakeConfEMISCN
syn region GentooMakeConfE start=/^/ end=/$/ contains=@GentooMakeConfEC,GentooMakeConfComment
" MISC {{{
@@ -84,6 +84,40 @@
hi def link GentooMakeConfEAKIX Preproc
" }}}
+" ACCEPT_LICENSE {{{
+syn match GentooMakeConfEAL /ACCEPT_LICENSE/ contained nextgroup=GentooMakeConfEALE skipwhite
+syn match GentooMakeConfEALE /=/ contained nextgroup=GentooMakeConfEALV skipwhite
+syn cluster GentooMakeConfEALIC add=GentooMakeConfEALIP,GentooMakeConfEALIS,GentooMakeConfEALIN,GentooMakeConfEALIX
+syn region GentooMakeConfEALV contained start=/"/ end=/"/ contains=@GentooMakeConfEALIC
+syn match GentooMakeConfEALIP /\*\|[a-zA-Z0-9\-_.+]\+/ contained
+syn match GentooMakeConfEALIS /@[a-zA-Z0-9\-_.+]\+/ contained
+syn match GentooMakeConfEALIN /-\*\|-@\?[a-zA-Z0-9\-_.+]\+/ contained
+syn match GentooMakeConfEALIX /\\.\|\$\({[^}]\+}\|[a-zA-Z0-9\-\_]\+\)/ contained
+
+hi def link GentooMakeConfEAL Identifier
+hi def link GentooMakeConfEALV String
+hi def link GentooMakeConfEALIP Keyword
+hi def link GentooMakeConfEALIS Special
+hi def link GentooMakeConfEALIN Error
+hi def link GentooMakeConfEALIX Preproc
+" }}}
+
+" ACCEPT_PROPERTIES {{{
+syn match GentooMakeConfEAP /ACCEPT_PROPERTIES/ contained nextgroup=GentooMakeConfEAPE skipwhite
+syn match GentooMakeConfEAPE /=/ contained nextgroup=GentooMakeConfEAPV skipwhite
+syn cluster GentooMakeConfEAPIC add=GentooMakeConfEAPIP,GentooMakeConfEAPIN,GentooMakeConfEAPIX
+syn region GentooMakeConfEAPV contained start=/"/ end=/"/ contains=@GentooMakeConfEAPIC
+syn match GentooMakeConfEAPIP /\*\|[a-zA-Z0-9\-_]\+/ contained
+syn match GentooMakeConfEAPIN /-\*\|-[a-zA-Z0-9\-_]\+/ contained
+syn match GentooMakeConfEAPIX /\\.\|\$\({[^}]\+}\|[a-zA-Z0-9\-\_]\+\)/ contained
+
+hi def link GentooMakeConfEAP Identifier
+hi def link GentooMakeConfEAPV String
+hi def link GentooMakeConfEAPIP Keyword
+hi def link GentooMakeConfEAPIN Error
+hi def link GentooMakeConfEAPIX Preproc
+" }}}
+
" C*FLAGS {{{
syn match GentooMakeConfECFLAGS /C\(XX\)\?FLAGS/ contained nextgroup=GentooMakeConfECFLAGSE skipwhite
syn match GentooMakeConfECFLAGSE /=/ contained nextgroup=GentooMakeConfECFLAGSV,GentooMakeConfECFLAGSVNoQ skipwhite
Added: trunk/gentoo-syntax/syntax/gentoo-package-license.vim
===================================================================
--- trunk/gentoo-syntax/syntax/gentoo-package-license.vim (rev 0)
+++ trunk/gentoo-syntax/syntax/gentoo-package-license.vim 2010-04-05 19:46:05 UTC (rev 71)
@@ -0,0 +1,39 @@
+" Vim syntax file
+" Language: Gentoo package.license files
+" Author: Dror Levin <spatz@gentoo.org
+" Copyright: Copyright (c) 2010 Dror Levin
+" Licence: You may redistribute this under the same terms as Vim itself
+"
+" Syntax highlighting for Gentoo package.license files. Requires vim 6.3 or
+" later.
+"
+
+if &compatible || v:version < 603
+ finish
+endif
+
+if exists("b:current_syntax")
+ finish
+endif
+
+runtime syntax/gentoo-common.vim
+
+syn region GentooPackageLicenseComment start=/#/ end=/$/
+ \ contains=GentooPackageLicenseEmail,GentooPackageLicenseDate,GentooBug
+
+syn match GentooPackageLicenseEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/
+syn match GentooPackageLicenseDate contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/
+
+syn match GentooPackageLicenseAtom /^[^ \t\n#]\+\S\+\/\S\+/
+ \ nextgroup=GentooPackageLicenseLicense skipwhite
+syn match GentooPackageLicenseLicense contained /-\?@\?\([a-zA-Z0-9\-_.+]\+\|\*\)/
+ \ nextgroup=GentooPackageLicenseLicense skipwhite
+
+hi def link GentooPackageLicenseComment Comment
+hi def link GentooPackageLicenseEmail Special
+hi def link GentooPackageLicenseDate Number
+hi def link GentooPackageLicenseAtom Identifier
+hi def link GentooPackageLicenseLicense Keyword
+
+let b:current_syntax = "gentoo-package-license"
+
Added: trunk/gentoo-syntax/syntax/gentoo-package-properties.vim
===================================================================
--- trunk/gentoo-syntax/syntax/gentoo-package-properties.vim (rev 0)
+++ trunk/gentoo-syntax/syntax/gentoo-package-properties.vim 2010-04-05 19:46:05 UTC (rev 71)
@@ -0,0 +1,39 @@
+" Vim syntax file
+" Language: Gentoo package.keywords files
+" Author: Ciaran McCreesh <ciaranm@gentoo.org>
+" Copyright: Copyright (c) 2004-2005 Ciaran McCreesh
+" Licence: You may redistribute this under the same terms as Vim itself
+"
+" Syntax highlighting for Gentoo package.keywords files. Requires vim 6.3 or
+" later.
+"
+
+if &compatible || v:version < 603
+ finish
+endif
+
+if exists("b:current_syntax")
+ finish
+endif
+
+runtime syntax/gentoo-common.vim
+
+syn region GentooPackagePropertiesComment start=/#/ end=/$/
+ \ contains=GentooPackagePropertiesEmail,GentooPackagePropertiesDate,GentooBug
+
+syn match GentooPackagePropertiesEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/
+syn match GentooPackagePropertiesDate contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/
+
+syn match GentooPackagePropertiesAtom /^[^ \t\n#]\+\S\+\/\S\+/
+ \ nextgroup=GentooPackagePropertiesProperty skipwhite
+syn match GentooPackagePropertiesProperty contained /-\?\([a-zA-Z0-9\-_]\+\|\*\)/
+ \ nextgroup=GentooPackagePropertiesProperty skipwhite
+
+hi def link GentooPackagePropertiesComment Comment
+hi def link GentooPackagePropertiesEmail Special
+hi def link GentooPackagePropertiesDate Number
+hi def link GentooPackagePropertiesAtom Identifier
+hi def link GentooPackagePropertiesProperty Keyword
+
+let b:current_syntax = "gentoo-package-properties"
+
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-05 19:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-05 19:46 [gentoo-commits] gentoo-syntax r71 - in trunk/gentoo-syntax: . ftdetect syntax Dror Levin (spatz)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox