runtime(spec): Drop obsolete s:GetRelVer() function
Commit:
https://github.com/vim/vim/commit/c175ce86fa96c34ed24443a6d0b4e87fda0f03fb
Author: Christian Brabandt <[email protected]>
Date: Mon May 25 17:21:43 2026 +0000
runtime(spec): Drop obsolete s:GetRelVer() function
Signed-off-by: Christian Brabandt <[email protected]>
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
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1wRZ7u-0068iL-63%40256bit.org.