jkunstle / rpms / vim

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