On Sun, 2014-01-26 at 18:03 +0100, glts wrote: > On Sun, Jan 26, 2014 at 5:44 PM, Igor Gnatenko > <[email protected]> wrote: > > # HG changeset patch > > # User Igor Gnatenko <[email protected]> > > # Date 1390754183 -14400 > > # Sun Jan 26 20:36:23 2014 +0400 > > # Node ID 2886ccd9f4fad3109261b72107b2ca3db65814fc > > # Parent c9cad40b418113f62ce3481f66351137b90910ef > > spec: add '%global' macros support > > > > diff -r c9cad40b4181 -r 2886ccd9f4fa runtime/ftplugin/spec.vim > > --- a/runtime/ftplugin/spec.vim Fri Jan 24 19:55:37 2014 +0100 > > +++ b/runtime/ftplugin/spec.vim Sun Jan 26 20:36:23 2014 +0400 > > @@ -150,6 +150,10 @@ > > execute a:strline > > let definestr = "^[ \t]*%define[ \t]\\+" . varname . "[ > > \t]\\+\\(.*\\)$" > > let linenum = search(definestr, "bW") > > + if (linenum == 0) > > + let definestr = substitute(definestr, "define", > > "global", "") > > + let linenum = search(definestr, "bW") > > + endif > > if (linenum != -1) > > let ret = ret . substitute(getline(linenum), > > definestr, "\\1", "") > > else > > diff -r c9cad40b4181 -r 2886ccd9f4fa runtime/syntax/spec.vim > > --- a/runtime/syntax/spec.vim Fri Jan 24 19:55:37 2014 +0100 > > +++ b/runtime/syntax/spec.vim Sun Jan 26 20:36:23 2014 +0400 > > @@ -82,7 +82,7 @@ > > > > "One line macros - valid in all ScriptAreas > > "tip: remember do include new items on specScriptArea's skip section > > -syn region specSectionMacroArea oneline matchgroup=specSectionMacro > > start='^%\(define\|patch\d*\|setup\|configure\|GNUconfigure\|find_lang\|makeinstall\|include\)\>' > > end='$' contains=specCommandOpts,specMacroIdentifier > > +syn region specSectionMacroArea oneline matchgroup=specSectionMacro > > start='^%\(define\|global\|patch\d*\|setup\|configure\|GNUconfigure\|find_lang\|makeinstall\|include\)\>' > > end='$' contains=specCommandOpts,specMacroIdentifier > > syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro > > start='^%{\(configure\|GNUconfigure\|find_lang\|makeinstall\)}' end='$' > > contains=specCommandOpts,specMacroIdentifier > > > > "%% Files Section %% > > @@ -113,7 +113,7 @@ > > syn region specPackageArea matchgroup=specSection start='^%package' > > end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment > > > > "%% Scripts Section %% > > -syn region specScriptArea matchgroup=specSection > > start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\)\>' > > skip='^%{\|^%\(define\|patch\d*\|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 > > +syn region specScriptArea matchgroup=specSection > > start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\)\>' > > skip='^%{\|^%\(define\|global\|patch\d*\|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 > > > > "%% Changelog Section %% > > syn region specChangelogArea matchgroup=specSection start='^%changelog' > > end='^%'me=e-1 > > contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense > > Contact the maintainer of ftplugin/spec.vim with your patch. You can > find their email address at the top of the file. > > Usually it's up to them to decide whether to include it. Okay. I will send this patch again to those maintainers and CC dev maillist. -- -Igor Gnatenko
-- -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
