runtime(spec): Recognize SourceLicense tag name in RPM spec syntax (#14046)

Commit: 
https://github.com/vim/vim/commit/315cd1fbcbba7c44ec8743f03645bfcaef58bd55
Author: Petr Pisar <ppi...@redhat.com>
Date:   Thu Feb 22 20:39:09 2024 +0100

    runtime(spec): Recognize SourceLicense tag name in RPM spec syntax 
(https://github.com/vim/vim/issues/14046)
    
    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ř <ppi...@redhat.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim
index aed04bc90..12ce8d5ac 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

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1rdF0A-00D0f7-Cr%40256bit.org.

Raspunde prin e-mail lui