2 " Language: generic ChangeLog file
3 " Maintainer: Gediminas Paulauskas <menesis@delfi.lt>
4 " Last Change: Jan 9, 2001
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
10 elseif exists("b:current_syntax")
16 syn match changelogText "^\s.*$" contains=changelogMail,changelogFiles,changelogBullet,changelogNumber,changelogMonth,changelogDay
17 syn match changelogHeader "^\S.*$" contains=changelogNumber,changelogMonth,changelogDay,changelogMail
18 syn match changelogFiles "^\s\+[+*]\s\+.\{-}:" contains=changelogBullet
19 syn match changelogBullet contained "^\s\+[+*]\s"
20 syn match changelogMail contained "<[A-Za-z0-9\._:+-]\+@[A-Za-z0-9\._-]\+>"
21 syn keyword changelogMonth contained jan feb mar apr may jun jul aug sep oct nov dec
22 syn keyword changelogDay contained mon tue wed thu fri sat sun
23 syn match changelogNumber contained "[.-]*[0-9]\+"
25 " Define the default highlighting.
26 " For version 5.7 and earlier: only when not done already
27 " For version 5.8 and later: only when an item doesn't have highlighting yet
28 if version >= 508 || !exists("did_changelog_syntax_inits")
30 let did_changelog_syntax_inits = 1
31 command -nargs=+ HiLink hi link <args>
33 command -nargs=+ HiLink hi def link <args>
36 HiLink changelogText Normal
37 HiLink changelogBullet Type
38 HiLink changelogFiles Comment
39 HiLink changelogHeader Statement
40 HiLink changelogMail Special
41 HiLink changelogNumber Number
42 HiLink changelogMonth Number
43 HiLink changelogDay Number
48 let b:current_syntax = "changelog"