Mercurial > vim
comparison runtime/syntax/m4.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | b6632d553df3 |
children | 46763b01cd9a |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
6 | 6 |
7 " This file will highlight user function calls if they use only | 7 " This file will highlight user function calls if they use only |
8 " capital letters and have at least one argument (i.e. the '(' | 8 " capital letters and have at least one argument (i.e. the '(' |
9 " must be there). Let me know if this is a problem. | 9 " must be there). Let me know if this is a problem. |
10 | 10 |
11 " For version 5.x: Clear all syntax items | 11 " quit when a syntax file was already loaded |
12 " For version 6.x: Quit when a syntax file was already loaded | |
13 if !exists("main_syntax") | 12 if !exists("main_syntax") |
14 if version < 600 | 13 if exists("b:current_syntax") |
15 syntax clear | 14 finish |
16 elseif exists("b:current_syntax") | 15 endif |
17 finish | 16 " we define it here so that included files can test for it |
18 endif | |
19 " we define it here so that included files can test for it | |
20 let main_syntax='m4' | 17 let main_syntax='m4' |
21 endif | 18 endif |
22 | 19 |
23 " define the m4 syntax | 20 " define the m4 syntax |
24 syn match m4Variable contained "\$\d\+" | 21 syn match m4Variable contained "\$\d\+" |
37 syn region m4Function matchgroup=m4Type start="\<[_A-Z][_A-Z0-9]*("he=e-1 end=")" contains=@m4Top | 34 syn region m4Function matchgroup=m4Type start="\<[_A-Z][_A-Z0-9]*("he=e-1 end=")" contains=@m4Top |
38 syn region m4String start="`" end="'" contained contains=@m4Top,@m4StringContents,SpellErrors | 35 syn region m4String start="`" end="'" contained contains=@m4Top,@m4StringContents,SpellErrors |
39 syn cluster m4Top contains=m4Comment,m4Constants,m4Special,m4Variable,m4String,m4Paren,m4Command,m4Statement,m4Function | 36 syn cluster m4Top contains=m4Comment,m4Constants,m4Special,m4Variable,m4String,m4Paren,m4Command,m4Statement,m4Function |
40 | 37 |
41 " Define the default highlighting. | 38 " Define the default highlighting. |
42 " For version 5.7 and earlier: only when not done already | 39 " Only when an item doesn't have highlighting yet |
43 " For version 5.8 and later: only when an item doesn't have highlighting yet | 40 command -nargs=+ HiLink hi def link <args> |
44 if version >= 508 || !exists("did_m4_syn_inits") | 41 HiLink m4Delimiter Delimiter |
45 if version < 508 | 42 HiLink m4Comment Comment |
46 let did_m4_syn_inits = 1 | 43 HiLink m4Function Function |
47 command -nargs=+ HiLink hi link <args> | 44 HiLink m4Keyword Keyword |
48 else | 45 HiLink m4Special Special |
49 command -nargs=+ HiLink hi def link <args> | 46 HiLink m4String String |
50 endif | 47 HiLink m4Statement Statement |
51 HiLink m4Delimiter Delimiter | 48 HiLink m4Preproc PreProc |
52 HiLink m4Comment Comment | 49 HiLink m4Type Type |
53 HiLink m4Function Function | 50 HiLink m4Special Special |
54 HiLink m4Keyword Keyword | 51 HiLink m4Variable Special |
55 HiLink m4Special Special | 52 HiLink m4Constants Constant |
56 HiLink m4String String | 53 HiLink m4Builtin Statement |
57 HiLink m4Statement Statement | 54 delcommand HiLink |
58 HiLink m4Preproc PreProc | |
59 HiLink m4Type Type | |
60 HiLink m4Special Special | |
61 HiLink m4Variable Special | |
62 HiLink m4Constants Constant | |
63 HiLink m4Builtin Statement | |
64 delcommand HiLink | |
65 endif | |
66 | 55 |
67 let b:current_syntax = "m4" | 56 let b:current_syntax = "m4" |
68 | 57 |
69 if main_syntax == 'm4' | 58 if main_syntax == 'm4' |
70 unlet main_syntax | 59 unlet main_syntax |