summaryrefslogtreecommitdiff
path: root/runtime/ftplugin/spec.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ftplugin/spec.vim')
-rw-r--r--runtime/ftplugin/spec.vim9
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim
index 9778e1cce..c3af8a9fc 100644
--- a/runtime/ftplugin/spec.vim
+++ b/runtime/ftplugin/spec.vim
@@ -1,7 +1,8 @@
" Plugin to update the %changelog section of RPM spec files
" Filename: spec.vim
-" Maintainer: Gustavo Niemeyer <niemeyer@conectiva.com>
-" Last Change: 2012 Mar 07
+" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
+" Former Maintainer: Gustavo Niemeyer <niemeyer@conectiva.com> (until March 2014)
+" Last Change: Sun Mar 2 11:24 MSK 2014 Igor Gnatenko
if exists("b:did_ftplugin")
finish
@@ -150,6 +151,10 @@ if !exists("*s:ParseRpmVars")
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