Skip to content

Commit 2241f08

Browse files
fundawangchrisbra
authored andcommitted
runtime(spec): add file triggers to syntax script
closes: #15569 Signed-off-by: Christian Brabandt <[email protected]>
1 parent 95dacbb commit 2241f08

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

runtime/syntax/spec.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
" Maintainer: Igor Gnatenko [email protected]
55
" Former Maintainer: Donovan Rebbechi [email protected] (until March 2014)
66
" Last Change: 2020 May 25
7+
" 2024 Sep 10 by Vim Project: add file triggers support, #15569
78

89
" quit when a syntax file was already loaded
910
if exists("b:current_syntax")
@@ -111,7 +112,7 @@ syn region specDescriptionArea matchgroup=specSection start='^%description' end=
111112
syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment
112113

113114
"%% Scripts Section %%
114-
syn region specScriptArea matchgroup=specSection start='^%\(prep\|generate_buildrequires\|conf\|build\|install\|clean\|check\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2
115+
syn region specScriptArea matchgroup=specSection start='^%\(prep\|generate_buildrequires\|conf\|build\|install\|clean\|check\|pre\|postun\|preun\|post\|posttrans\|filetriggerin\|filetriggerun\|filetriggerpostun\|transfiletriggerin\|transfiletriggerun\|transfiletriggerpostun\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2
115116

116117
"%% Changelog Section %%
117118
syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense

0 commit comments

Comments
 (0)