Commit: runtime(spec): Drop obsolete s:GetRelVer() function

1 view
Skip to first unread message

Christian Brabandt

unread,
1:30 PM (9 hours ago) 1:30 PM
to vim...@googlegroups.com
runtime(spec): Drop obsolete s:GetRelVer() function

Commit: https://github.com/vim/vim/commit/c175ce86fa96c34ed24443a6d0b4e87fda0f03fb
Author: Christian Brabandt <c...@256bit.org>
Date: Mon May 25 17:21:43 2026 +0000

runtime(spec): Drop obsolete s:GetRelVer() function

Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim
index dcf290891..cf8552c16 100644
--- a/runtime/ftplugin/spec.vim
+++ b/runtime/ftplugin/spec.vim
@@ -6,6 +6,7 @@
" Update by Zdenek Dohnal, 2022 May 17
" 2024 Sep 10 by Vim Project: add epoch support for spec changelog, #15537
" 2024 Oct 07 by Vim Project: add comment support, #15817
+" 2026 May 25 by Vim Project: drop the python GetRelVer() func

if exists("b:did_ftplugin")
finish
@@ -27,33 +28,7 @@ if !exists("no_plugin_maps") && !exists("no_spec_maps")
endif

if !hasmapto("call <SID>SpecChangelog(\"\")<CR>")
- noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR>
-endif
-
-if !exists("*s:GetRelVer")
- function! s:GetRelVer()
- if has('python')
-python << PYEND
-import sys, datetime, shutil, tempfile
-import vim
-
-try:
- import rpm
-except ImportError:
- pass
-else:
- specfile = vim.current.buffer.name
- if specfile:
- rpm.delMacro("dist")
- spec = rpm.spec(specfile)
- headers = spec.sourceHeader
- version = headers["Version"]
- release = headers["Release"]
- vim.command("let ver = '" + version + "'")
- vim.command("let rel = '" + release + "'")
-PYEND
- endif
- endfunction
+ noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR>
endif

if !exists("*s:SpecChangelog")
@@ -112,8 +87,6 @@ if !exists("*s:SpecChangelog")
let include_release_info = 0
endif

- call s:GetRelVer()
-
if chgline == -1
let option = confirm("Can't find %changelog. Create one? ","&End of file
&Here
&Cancel",3)
if option == 1
Reply all
Reply to author
Forward
0 new messages