Karsten Hopp dfd24f
--- vim73/runtime/ftplugin/spec.vim	2012-08-06 17:51:41.000000000 +0200
Karsten Hopp dfd24f
+++ /tmp/spec.vim	2012-08-06 17:51:07.730701143 +0200
Karsten Hopp dfd24f
@@ -40,10 +40,12 @@
Karsten Hopp dfd24f
 		endif
Karsten Hopp dfd24f
 		let line = 0
Karsten Hopp dfd24f
 		let name = ""
Karsten Hopp dfd24f
+		let epoch = ""
Karsten Hopp dfd24f
 		let ver = ""
Karsten Hopp dfd24f
 		let rel = ""
Karsten Hopp dfd24f
 		let nameline = -1
Karsten Hopp dfd24f
 		let verline = -1
Karsten Hopp dfd24f
+		let epochline = -1
Karsten Hopp dfd24f
 		let relline = -1
Karsten Hopp dfd24f
 		let chgline = -1
Karsten Hopp dfd24f
 		while (line <= line("$"))
Karsten Hopp dfd24f
@@ -51,6 +53,9 @@
Karsten Hopp dfd24f
 			if (name == "" && linestr =~? '^Name:')
Karsten Hopp dfd24f
 				let nameline = line
Karsten Hopp dfd24f
 				let name = substitute(strpart(linestr,5), '^[	 ]*\([^ 	]\+\)[		]*$','\1','')
Karsten Hopp dfd24f
+			elseif (epoch == "" && linestr =~? '^Epoch:')
Karsten Hopp dfd24f
+				let epochline = line
Karsten Hopp dfd24f
+				let epoch = substitute(strpart(linestr,6), '^[	 ]*\([^ 	]\+\)[		]*$','\1','')
Karsten Hopp dfd24f
 			elseif (ver == "" && linestr =~? '^Version:')
Karsten Hopp dfd24f
 				let verline = line
Karsten Hopp dfd24f
 				let ver = substitute(strpart(linestr,8), '^[	 ]*\([^ 	]\+\)[		]*$','\1','')
Karsten Hopp dfd24f
@@ -67,6 +72,7 @@
Karsten Hopp dfd24f
 		if (nameline != -1 && verline != -1 && relline != -1)
Karsten Hopp dfd24f
 			let include_release_info = 1
Karsten Hopp dfd24f
 			let name = s:ParseRpmVars(name, nameline)
Karsten Hopp dfd24f
+			let epoch = s:ParseRpmVars(epoch, epochline)
Karsten Hopp dfd24f
 			let ver = s:ParseRpmVars(ver, verline)
Karsten Hopp dfd24f
 			let rel = s:ParseRpmVars(rel, relline)
Karsten Hopp dfd24f
 		else
Karsten Hopp dfd24f
@@ -89,7 +95,11 @@
Karsten Hopp dfd24f
             execute "language time C"
Karsten Hopp dfd24f
 			let parsed_format = "* ".strftime(format)
Karsten Hopp dfd24f
             execute "language time " . save_time
Karsten Hopp dfd24f
-			let release_info = ver."-".rel
Karsten Hopp dfd24f
+			if (epoch == "")
Karsten Hopp dfd24f
+				let release_info = ver."-".rel
Karsten Hopp dfd24f
+			else
Karsten Hopp dfd24f
+				let release_info = epoch.":".ver."-".rel
Karsten Hopp dfd24f
+			endif
Karsten Hopp dfd24f
 			let wrong_format = 0
Karsten Hopp dfd24f
 			let wrong_release = 0
Karsten Hopp dfd24f
 			let insert_line = 0