From 315cd1fbcbba7c44ec8743f03645bfcaef58bd55 Mon Sep 17 00:00:00 2001 From: Petr Pisar Date: Thu, 22 Feb 2024 20:39:09 +0100 Subject: runtime(spec): Recognize SourceLicense tag name in RPM spec syntax (#14046) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rpm-4.19.0 added a new SourceLicense tag. It is used at the same place as License tag. This patch adds the new tag name into a Vim syntax file to be highligted the same way as the License tag. Note that it has to be defined in the syntax file before Source\d* regexp. Otherwise it's not recognized by Vim. Signed-off-by: Petr Písař Signed-off-by: Christian Brabandt --- runtime/syntax/spec.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/syntax') diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim index aed04bc900..12ce8d5ac1 100644 --- a/runtime/syntax/spec.vim +++ b/runtime/syntax/spec.vim @@ -102,7 +102,7 @@ syn case ignore "%% PreAmble Section %% "Copyright and Serial were deprecated by License and Epoch syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier -syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Recommends\|Suggests\|Supplements\|Enhances\|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\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier +syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Recommends\|Suggests\|Supplements\|Enhances\|Icon\|URL\|SourceLicense\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier "%% Description Section %% syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1 contains=specDescriptionOpts,specEmail,specURL,specNumber,specMacroIdentifier,specComment -- cgit v1.2.3