runtime(spec): add file triggers to syntax script
Commit:
https://github.com/vim/vim/commit/2241f0845fcb2ff362f34abd756cedf239e50b55
Author: fundawang <[email protected]>
Date: Tue Sep 10 21:31:49 2024 +0200
runtime(spec): add file triggers to syntax script
closes: https://github.com/vim/vim/issues/15569
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim
index 4cb3a343e..730a0b8cc 100644
--- a/runtime/syntax/spec.vim
+++ b/runtime/syntax/spec.vim
@@ -4,6 +4,7 @@
" Maintainer: Igor Gnatenko [email protected]
" Former Maintainer: Donovan Rebbechi [email protected] (until March 2014)
" Last Change: 2020 May 25
+" 2024 Sep 10 by Vim Project: add file triggers support, #15569
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -111,7 +112,7 @@ syn region specDescriptionArea matchgroup=specSection
start='^%description' end=
syn region specPackageArea matchgroup=specSection start='^%package'
end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment
"%% Scripts Section %%
-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
+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
"%% Changelog Section %%
syn region specChangelogArea matchgroup=specSection start='^%changelog'
end='^%'me=e-1
contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1so6nQ-007mBX-S5%40256bit.org.