public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-syntax:master commit in: syntax/
Date: Tue, 21 Aug 2018 08:02:41 +0000 (UTC)	[thread overview]
Message-ID: <1534835451.4451cbdf4026a828232ba87b73f69feed54b41ab.mgorny@gentoo> (raw)

commit:     4451cbdf4026a828232ba87b73f69feed54b41ab
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 21 07:10:51 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug 21 07:10:51 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=4451cbdf

syntax: Move package.*/etc. common rules to common file

 syntax/gentoo-mirrors.vim            | 11 +----------
 syntax/gentoo-package-common.vim     | 21 +++++++++++++++++++++
 syntax/gentoo-package-keywords.vim   | 11 +----------
 syntax/gentoo-package-license.vim    | 11 +----------
 syntax/gentoo-package-mask.vim       | 12 +-----------
 syntax/gentoo-package-properties.vim | 11 +----------
 syntax/gentoo-package-use.vim        | 13 +------------
 syntax/gentoo-use-desc.vim           |  6 +-----
 8 files changed, 28 insertions(+), 68 deletions(-)

diff --git a/syntax/gentoo-mirrors.vim b/syntax/gentoo-mirrors.vim
index d5b09f6..686465b 100644
--- a/syntax/gentoo-mirrors.vim
+++ b/syntax/gentoo-mirrors.vim
@@ -16,22 +16,13 @@ if exists("b:current_syntax")
     finish
 endif
 
-runtime syntax/gentoo-common.vim
-
-syn region GentooMirrorsComment start=/#/ end=/$/
-    \ contains=GentooMirrorsEmail,GentooMirrorsDate,GentooBug
-
-syn match  GentooMirrorsEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/
-syn match  GentooMirrorsDate  contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/
+runtime syntax/gentoo-package-common.vim
 
 syn match  GentooMirrorsAtom /^[^# \t]\+/
     \ nextgroup=GentooMirrorsUrl skipwhite
 syn region GentooMirrorsUrl contained start=/\(http\|ftp\):\/\// end=/\(\s\)\@=\|$/
     \ nextgroup=GentooMirrorsUrl skipwhite
 
-hi def link GentooMirrorsComment          Comment
-hi def link GentooMirrorsEmail            Special
-hi def link GentooMirrorsDate             Number
 hi def link GentooMirrorsAtom             Identifier
 hi def link GentooMirrorsUrl              String
 

diff --git a/syntax/gentoo-package-common.vim b/syntax/gentoo-package-common.vim
new file mode 100644
index 0000000..1e8091e
--- /dev/null
+++ b/syntax/gentoo-package-common.vim
@@ -0,0 +1,21 @@
+" Vim syntax file
+" Language:	Gentoo package.*/use.desc/etc. common rules
+" Author:	Michał Górny <mgorny@gentoo.org>
+" Copyright:	Copyright (c) 2018 Michał Górny
+" Licence:	You may redistribute this under the same terms as Vim itself
+
+if &compatible || v:version < 603
+    finish
+endif
+
+runtime syntax/gentoo-common.vim
+
+syn region GentooPackageComment start=/#/ end=/$/
+    \ contains=GentooPackageEmail,GentooPackageDate,GentooBug
+
+syn match  GentooPackageEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/
+syn match  GentooPackageDate  contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/
+
+hi def link GentooPackageComment          Comment
+hi def link GentooPackageEmail            Special
+hi def link GentooPackageDate             Number

diff --git a/syntax/gentoo-package-keywords.vim b/syntax/gentoo-package-keywords.vim
index 190954f..4315d91 100644
--- a/syntax/gentoo-package-keywords.vim
+++ b/syntax/gentoo-package-keywords.vim
@@ -16,22 +16,13 @@ if exists("b:current_syntax")
     finish
 endif
 
-runtime syntax/gentoo-common.vim
-
-syn region GentooPackageKeywordsComment start=/#/ end=/$/
-    \ contains=GentooPackageKeywordsEmail,GentooPackageKeywordsDate,GentooBug
-
-syn match  GentooPackageKeywordsEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/
-syn match  GentooPackageKeywordsDate  contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/
+runtime syntax/gentoo-package-common.vim
 
 syn match  GentooPackageKeywordsAtom /^[\ \t]*[^ \t\n#]\+\S\+\/\S\+/
     \ nextgroup=GentooPackageKeywordsKeyword skipwhite
 syn match  GentooPackageKeywordsKeyword contained /-\?[-~]\?\([a-z0-9\-]\+\|\*\)/
     \ nextgroup=GentooPackageKeywordsKeyword skipwhite
 
-hi def link GentooPackageKeywordsComment          Comment
-hi def link GentooPackageKeywordsEmail            Special
-hi def link GentooPackageKeywordsDate             Number
 hi def link GentooPackageKeywordsAtom             Identifier
 hi def link GentooPackageKeywordsKeyword          Keyword
 

diff --git a/syntax/gentoo-package-license.vim b/syntax/gentoo-package-license.vim
index 824d70a..8764a66 100644
--- a/syntax/gentoo-package-license.vim
+++ b/syntax/gentoo-package-license.vim
@@ -16,22 +16,13 @@ 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\})/
+runtime syntax/gentoo-package-common.vim
 
 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
 

diff --git a/syntax/gentoo-package-mask.vim b/syntax/gentoo-package-mask.vim
index c36b45d..d08ec0e 100644
--- a/syntax/gentoo-package-mask.vim
+++ b/syntax/gentoo-package-mask.vim
@@ -16,20 +16,10 @@ if exists("b:current_syntax")
     finish
 endif
 
-runtime syntax/gentoo-common.vim
-
-" Header
-syn region GentooPackageMaskComment start=/#/ end=/$/
-    \ contains=GentooPackageMaskEmail,GentooPackageMaskDate,GentooBug
-
-syn match  GentooPackageMaskEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/
-syn match  GentooPackageMaskDate  contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/
+runtime syntax/gentoo-package-common.vim
 
 syn match  GentooPackageMaskAtom /^[^ \t\n#]\+\S\+\/\S\+/
 
-hi def link GentooPackageMaskComment          Comment
-hi def link GentooPackageMaskEmail            Special
-hi def link GentooPackageMaskDate             Number
 hi def link GentooPackageMaskAtom             Identifier
 
 let b:current_syntax = "gentoo-package-mask"

diff --git a/syntax/gentoo-package-properties.vim b/syntax/gentoo-package-properties.vim
index 8609491..faf15ad 100644
--- a/syntax/gentoo-package-properties.vim
+++ b/syntax/gentoo-package-properties.vim
@@ -16,22 +16,13 @@ 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\})/
+runtime syntax/gentoo-package-common.vim
 
 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
 

diff --git a/syntax/gentoo-package-use.vim b/syntax/gentoo-package-use.vim
index d4eda18..7136467 100644
--- a/syntax/gentoo-package-use.vim
+++ b/syntax/gentoo-package-use.vim
@@ -16,15 +16,7 @@ if exists("b:current_syntax")
     finish
 endif
 
-runtime syntax/gentoo-common.vim
-
-syn region GentooPackageUseComment start=/#/ end=/$/
-    \ contains=GentooPackageUseEmail,GentooPackageUseDate,GentooBug
-
-syn match  GentooPackageUseEmail contained
-    \ /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/
-syn match  GentooPackageUseDate  contained
-    \ /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/
+runtime syntax/gentoo-package-common.vim
 
 syn match  GentooPackageUseAtom /^[^ \t\n#]\+\S\+\/\S\+/
     \ nextgroup=GentooPackageUseUse,GentooPackageUseUnuse,
@@ -42,9 +34,6 @@ syn match  GentooPackageUseExpand contained
     \ nextgroup=GentooPackageUseUse,GentooPackageUseUnuse
     \ skipwhite
 
-hi def link GentooPackageUseComment          Comment
-hi def link GentooPackageUseEmail            Special
-hi def link GentooPackageUseDate             Number
 hi def link GentooPackageUseAtom             Identifier
 hi def link GentooPackageUseUse              Special
 hi def link GentooPackageUseUnuse            Keyword

diff --git a/syntax/gentoo-use-desc.vim b/syntax/gentoo-use-desc.vim
index ec4a48b..e2c4041 100644
--- a/syntax/gentoo-use-desc.vim
+++ b/syntax/gentoo-use-desc.vim
@@ -16,10 +16,7 @@ if exists("b:current_syntax")
     finish
 endif
 
-runtime syntax/gentoo-common.vim
-
-syn region GentooUseDescComment start=/#/ end=/$/
-    \ contains=GentooBug
+runtime syntax/gentoo-package-common.vim
 
 syn match GentooUseDescPackage /^\(#\)\@!\([a-zA-Z0-9\-\_+\.]\+\/[a-zA-Z0-9\-\_+]\+\)\?/ nextgroup=GentooUseDescColon,GentooUseDescFlag skipwhite
 syn match GentooUseDescColon /:/ contained nextgroup=GentooUseDescFlag
@@ -27,7 +24,6 @@ syn match GentooUseDescFlag contained /[a-zA-Z0-9\-\_+@:]\+/ nextgroup=GentooUse
 syn match GentooUseDescDash /-\s*/ contained nextgroup=GentooUseDescDesc skipwhite
 syn region GentooUseDescDesc start=// end=/$/ contained skipwhite
 
-hi def link GentooUseDescComment          Comment
 hi def link GentooUseDescPackage          Keyword
 hi def link GentooUseDescFlag             Identifier
 hi def link GentooUseDescDesc             String


             reply	other threads:[~2018-08-21  8:02 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21  8:02 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-29 14:15 [gentoo-commits] proj/gentoo-syntax:master commit in: syntax/ Michał Górny
2023-06-14 14:25 Michał Górny
2023-03-11 20:42 Michał Górny
2023-03-11 20:42 Michał Górny
2023-03-09  5:46 Michał Górny
2023-03-09  5:46 Michał Górny
2023-03-09  5:46 Michał Górny
2023-03-09  5:46 Michał Górny
2023-03-09  5:46 Michał Górny
2023-02-01  5:03 Michał Górny
2022-07-13  5:26 Michał Górny
2022-05-02 19:06 Michał Górny
2022-02-20 16:03 Michał Górny
2022-02-20 16:03 Michał Górny
2022-02-20 16:03 Michał Górny
2022-02-20 16:03 Michał Górny
2021-09-01 16:21 Michał Górny
2021-04-28  7:27 Michał Górny
2020-12-16 13:32 Michał Górny
2020-10-05 15:27 Michał Górny
2019-12-13 10:52 Michał Górny
2019-12-13  7:16 Michał Górny
2019-11-27  8:09 Michał Górny
2019-11-27  8:09 Michał Górny
2019-11-27  8:09 Michał Górny
2019-09-30  7:28 Michał Górny
2019-05-25  6:45 Michał Górny
2019-05-25  6:45 Michał Górny
2018-09-15 19:18 Michał Górny
2018-08-21  8:02 Michał Górny
2018-08-21  8:02 Michał Górny
2018-08-21  8:02 Michał Górny
2018-08-21  8:02 Michał Górny
2018-08-21  8:02 Michał Górny
2018-08-21  8:02 Michał Górny
2018-08-21  8:02 Michał Górny
2018-08-20 20:37 Michał Górny
2018-08-20 20:37 Michał Górny
2018-08-20 20:37 Michał Górny
2018-08-20 20:10 Michał Górny
2018-08-14 13:58 Michał Górny
2018-08-14 13:55 Michał Górny
2018-08-14 13:55 Michał Górny
2016-03-05 23:50 Tim Harder
2016-03-05 23:35 Tim Harder
2016-03-05 23:35 Tim Harder
2016-03-05 23:35 Tim Harder
2016-03-05 23:35 Tim Harder
2016-03-05 23:35 Tim Harder
2016-03-05 23:35 Tim Harder
2016-03-05 23:35 Tim Harder
2016-03-05 23:35 Tim Harder
2016-03-05 23:35 Tim Harder
2016-03-05 23:35 Tim Harder
2016-03-05 23:35 Tim Harder
2014-11-29 18:36 Tim Harder
2014-11-29  8:08 Tim Harder
2014-11-29  7:50 Tim Harder
2014-11-29  7:19 Tim Harder
2014-11-29  7:19 Tim Harder
2014-11-29  4:58 Tim Harder
2014-11-29  4:41 Tim Harder
2014-11-29  4:41 Tim Harder
2014-11-02  0:28 Tim Harder
2014-11-02  0:28 Tim Harder
2013-05-31  8:26 Tim Harder
2013-01-24 20:00 Tim Harder
2012-11-06 21:20 Christian Ruppert
2012-04-18 19:47 Christian Ruppert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1534835451.4451cbdf4026a828232ba87b73f69feed54b41ab.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox