|
Karsten Hopp |
0b3c90 |
--- vim70/runtime/ftplugin/spec.vim.rh1 2006-05-10 19:37:45.000000000 +0200
|
|
Karsten Hopp |
0b3c90 |
+++ vim70/runtime/ftplugin/spec.vim 2006-11-13 12:21:32.000000000 +0100
|
|
Karsten Hopp |
0b3c90 |
@@ -18,11 +18,18 @@
|
|
Karsten Hopp |
0b3c90 |
|
|
Karsten Hopp |
0b3c90 |
if !exists("*s:SpecChangelog")
|
|
Karsten Hopp |
0b3c90 |
function s:SpecChangelog(format)
|
|
Karsten Hopp |
0b3c90 |
+ let save_time = v:lc_time
|
|
Karsten Hopp |
0b3c90 |
if strlen(a:format) == 0
|
|
Karsten Hopp |
0b3c90 |
if !exists("g:spec_chglog_format")
|
|
Karsten Hopp |
0b3c90 |
- let email = input("Email address: ")
|
|
Karsten Hopp |
0b3c90 |
- let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
|
Karsten Hopp |
0b3c90 |
- echo "\r"
|
|
Karsten Hopp |
0b3c90 |
+ if !exists("g:packager")
|
|
Karsten Hopp |
0b3c90 |
+ let email = input("Email address: ")
|
|
Karsten Hopp |
0b3c90 |
+ let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
|
Karsten Hopp |
0b3c90 |
+ echo "\r"
|
|
Karsten Hopp |
0b3c90 |
+ else
|
|
Karsten Hopp |
0b3c90 |
+ let email = g:packager
|
|
Karsten Hopp |
0b3c90 |
+ let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
|
Karsten Hopp |
0b3c90 |
+ echo "\r"
|
|
Karsten Hopp |
0b3c90 |
+ endif
|
|
Karsten Hopp |
0b3c90 |
endif
|
|
Karsten Hopp |
0b3c90 |
let format = g:spec_chglog_format
|
|
Karsten Hopp |
0b3c90 |
else
|
|
Karsten Hopp |
0b3c90 |
@@ -58,7 +65,7 @@
|
|
Karsten Hopp |
0b3c90 |
let line = line+1
|
|
Karsten Hopp |
0b3c90 |
endwhile
|
|
Karsten Hopp |
0b3c90 |
if (nameline != -1 && verline != -1 && relline != -1)
|
|
Karsten Hopp |
0b3c90 |
- let include_release_info = exists("g:spec_chglog_release_info")
|
|
Karsten Hopp |
0b3c90 |
+ let include_release_info = 1
|
|
Karsten Hopp |
0b3c90 |
let name = s:ParseRpmVars(name, nameline)
|
|
Karsten Hopp |
0b3c90 |
let ver = s:ParseRpmVars(ver, verline)
|
|
Karsten Hopp |
0b3c90 |
let rel = s:ParseRpmVars(rel, relline)
|
|
Karsten Hopp |
0b3c90 |
@@ -79,8 +86,10 @@
|
|
Karsten Hopp |
0b3c90 |
endif
|
|
Karsten Hopp |
0b3c90 |
endif
|
|
Karsten Hopp |
0b3c90 |
if (chgline != -1)
|
|
Karsten Hopp |
0b3c90 |
+ execute "language time C"
|
|
Karsten Hopp |
0b3c90 |
let parsed_format = "* ".strftime(format)
|
|
Karsten Hopp |
0b3c90 |
- let release_info = "+ ".name."-".ver."-".rel
|
|
Karsten Hopp |
0b3c90 |
+ execute "language time " . save_time
|
|
Karsten Hopp |
0b3c90 |
+ let release_info = ver."-".rel
|
|
Karsten Hopp |
0b3c90 |
let wrong_format = 0
|
|
Karsten Hopp |
0b3c90 |
let wrong_release = 0
|
|
Karsten Hopp |
0b3c90 |
let insert_line = 0
|
|
Karsten Hopp |
0b3c90 |
@@ -97,15 +106,14 @@
|
|
Karsten Hopp |
0b3c90 |
execute relline
|
|
Karsten Hopp |
0b3c90 |
normal ?
|
|
Karsten Hopp |
0b3c90 |
let rel = substitute(strpart(getline(relline),8), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
|
|
Karsten Hopp |
0b3c90 |
- let release_info = "+ ".name."-".ver."-".rel
|
|
Karsten Hopp |
0b3c90 |
+ let release_info = ver."-".rel
|
|
Karsten Hopp |
0b3c90 |
endif
|
|
Karsten Hopp |
0b3c90 |
endif
|
|
Karsten Hopp |
0b3c90 |
let n = 0
|
|
Karsten Hopp |
0b3c90 |
- call append(chgline+n, parsed_format)
|
|
Karsten Hopp |
0b3c90 |
if include_release_info
|
|
Karsten Hopp |
0b3c90 |
- let n = n + 1
|
|
Karsten Hopp |
0b3c90 |
- call append(chgline+n, release_info)
|
|
Karsten Hopp |
0b3c90 |
+ let parsed_format = parsed_format." ".release_info
|
|
Karsten Hopp |
0b3c90 |
endif
|
|
Karsten Hopp |
0b3c90 |
+ call append(chgline+n, parsed_format)
|
|
Karsten Hopp |
0b3c90 |
let n = n + 1
|
|
Karsten Hopp |
0b3c90 |
call append(chgline+n,"- ")
|
|
Karsten Hopp |
0b3c90 |
let n = n + 1
|