]>
Commit | Line | Data |
---|---|---|
ef454d0a | 1 | --- vim62/runtime/syntax/spec.vim.orig 2004-04-09 17:04:52.516737648 +0200 |
0ffe95c8 | 2 | +++ vim62/runtime/syntax/spec.vim 2004-04-10 00:30:42.532117184 +0200 |
9b55c8ab | 3 | @@ -15,7 +15,7 @@ |
4 | ||
5 | syn sync minlines=1000 | |
6 | ||
7 | -syn match specSpecialChar contained '[][!$()\\|>^;:{}]' | |
8 | +syn match specSpecialChar contained '[][!$()\\|>^;:]' | |
9 | syn match specColon contained ':' | |
10 | syn match specPercent contained '%' | |
11 | ||
0ffe95c8 | 12 | @@ -23,7 +23,9 @@ |
9b55c8ab | 13 | syn match specVariables contained '\${\w*}' contains=specSpecialVariablesNames,specSpecialChar |
14 | ||
15 | syn match specMacroIdentifier contained '%\h\w*' contains=specMacroNameLocal,specMacroNameOther,specPercent | |
16 | -syn match specMacroIdentifier contained '%{\w*}' contains=specMacroNameLocal,specMacroNameOther,specPercent,specSpecialChar | |
17 | +"syn match specMacroIdentifier contained '%{\w*}' contains=specMacroNameLocal,specMacroNameOther,specPercent,specSpecialChar | |
18 | +syn region specMacroIdentifier oneline matchgroup=Special start='%{' skip='\\}' end='}' contains=specMacroNameLocal,specMacroNameOther,specPercent,specSpecialChar | |
0ffe95c8 | 19 | +syn match specBcond contained '%{with\(out\)\?\s\+[a-zA-Z_-]\+}' |
9b55c8ab | 20 | |
21 | syn match specSpecialVariables contained '\$[0-9]\|\${[0-9]}' | |
22 | syn match specCommandOpts contained '\s\(-\w\+\|--\w[a-zA-Z_-]\+\)'ms=s+1 | |
0ffe95c8 | 23 | @@ -83,8 +85,9 @@ |
ef454d0a | 24 | |
25 | "One line macros - valid in all ScriptAreas | |
26 | "tip: remember do include new itens on specScriptArea's skip section | |
27 | -syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(define\|patch\d*\|setup\|configure2_13\|configure\|GNUconfigure\|find_lang\|makeinstall\)\>' end='$' contains=specCommandOpts,specMacroIdentifier | |
0ffe95c8 | 28 | +syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(\(un\)\?define\|patch\d*\|setup\|configure2_13\|configure\|GNUconfigure\|find_lang\|makeinstall\|bcond_with\(out\)\?\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier,specSectionMacroBcondArea |
ef454d0a | 29 | syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure2_13\|configure\|GNUconfigure\|find_lang\|makeinstall\)}' end='$' contains=specCommandOpts,specMacroIdentifier |
0ffe95c8 | 30 | +syn region specSectionMacroBcondArea oneline matchgroup=specBlock start='%{!\??\(with\(out\)\?_[a-zA-Z_]\+\|debug\):' skip='\\}' end='}' contains=ALLBUT,shCase |
ef454d0a | 31 | |
32 | "%% Files Section %% | |
33 | "TODO %config valid parameters: missingok\|noreplace | |
0ffe95c8 | 34 | @@ -105,7 +108,7 @@ |
ef454d0a | 35 | "%% PreAmble Section %% |
36 | "Copyright and Serial were deprecated by License and Epoch | |
37 | syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier | |
38 | -syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReqProv\|AutoReq\|AutoProv\|Epoch\|NoSource\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier | |
9b55c8ab | 39 | +syn region specPreAmble oneline matchgroup=specCommand start='\(^\|\(^%{!\??with\(out\)\?_[a-zA-Z_]\+:\)\@<=\)\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReqProv\|AutoReq\|AutoProv\|Epoch\|NoSource\)' end='$\|}\@=' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier,specSectionMacroBcondArea |
ef454d0a | 40 | |
41 | "%% Description Section %% | |
42 | syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1 contains=specDescriptionOpts,specEmail,specURL,specNumber,specMacroIdentifier,specComment | |
0ffe95c8 | 43 | @@ -114,7 +117,7 @@ |
ef454d0a | 44 | syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment |
45 | ||
46 | "%% Scripts Section %% | |
47 | -syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\|triggerin\|triggerun\|triggerpostun\)\>' skip='^%{\|^%\(define\|patch\d*\|configure2_13\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 | |
48 | +syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\|triggerin\|triggerun\|triggerpostun\)\>' skip='^%{\|^%\(define\|patch\d*\|configure2_13\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2,specSectionMacroBcondArea | |
49 | ||
50 | "%% Changelog Section %% | |
51 | syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense | |
0ffe95c8 | 52 | @@ -132,7 +135,7 @@ |
9b55c8ab | 53 | syn match shComment contained '#.*$' |
54 | ||
55 | syn region shQuote1 contained matchgroup=shQuoteDelim start=+'+ skip=+\\'+ end=+'+ contains=specMacroIdentifier | |
56 | -syn region shQuote2 contained matchgroup=shQuoteDelim start=+"+ skip=+\\"+ end=+"+ contains=specVariables,specMacroIdentifier | |
57 | +syn region shQuote2 contained matchgroup=shQuoteDelim start=+"+ skip=+\\"+ end=+"+ contains=specVariables,specMacroIdentifier,specSectionMacroBcondArea | |
58 | ||
59 | syn match shOperator contained '[><|!&;]\|[!=]=' | |
60 | syn region shDo transparent matchgroup=specBlock start="\<do\>" end="\<done\>" contains=ALLBUT,shFunction,shDoError,shCase,specPreAmble,@specListedFiles | |
0ffe95c8 | 61 | @@ -192,6 +195,7 @@ |
62 | ||
63 | "spec colors | |
64 | HiLink specBlock Function | |
65 | + HiLink specBcond Function | |
66 | HiLink specColon Special | |
67 | HiLink specCommand Statement | |
68 | HiLink specCommandOpts specOpts |