]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime: make command name for &iskeywordprg more unique (#13297)
authorEnno <Konfekt@users.noreply.github.com>
Sun, 8 Oct 2023 17:14:07 +0000 (19:14 +0200)
committerGitHub <noreply@github.com>
Sun, 8 Oct 2023 17:14:07 +0000 (19:14 +0200)
See https://github.com/vim/vim/pull/13213/commits by @dkearns:
Rename 'keywordprg' user command to ShKeywordPrg as this is just a
leaking implementation detail.

Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/ftplugin/gpg.vim
runtime/ftplugin/modconf.vim
runtime/ftplugin/muttrc.vim
runtime/ftplugin/readline.vim
runtime/ftplugin/sshconfig.vim
runtime/ftplugin/sudoers.vim
runtime/ftplugin/systemd.vim
runtime/ftplugin/udevrules.vim
runtime/ftplugin/zsh.vim

index 2415555e09c3fd9d37462e296bb6b10e9e1549ce..7fb4f47ed8a958137d7c23401dddc92b3637edd4 100644 (file)
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:             gpg(1) configuration file
 " Previous Maintainer:  Nikolai Weibull <now@bitwi.se>
-" Latest Revision:      2008-07-09
+" Latest Revision:      2023-10-07
 
 if exists("b:did_ftplugin")
   finish
@@ -17,17 +17,17 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
 
 if has('unix') && executable('less')
   if !has('gui_running')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 GpgKeywordPrg
           \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+--' . <q-args> . '\b'' --hilite-search" man ' . 'gpg' |
           \ redraw!
   elseif has('terminal')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 GpgKeywordPrg
           \ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+--' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'gpg'
   endif
-  if exists(':Sman') == 2
+  if exists(':GpgKeywordPrg') == 2
     setlocal iskeyword+=-
-    setlocal keywordprg=:Sman
-    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman'
+    setlocal keywordprg=:GpgKeywordPrg
+    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer GpgKeywordPrg'
   endif
 endif
 
index d5eda5af218c5914942805e2dc53645404f8a399..22d18a9aad8f963e04c351445db88b68b62ad4cb 100644 (file)
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:             modules.conf(5) configuration file
 " Previous Maintainer:  Nikolai Weibull <now@bitwi.se>
-" Latest Revision:      2008-07-09
+" Latest Revision:      2023-10-07
 
 if exists("b:did_ftplugin")
   finish
@@ -18,17 +18,17 @@ setlocal formatoptions-=t formatoptions+=croql
 
 if has('unix') && executable('less')
   if !has('gui_running')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 ModconfKeywordPrg
           \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s{,8}' . <q-args> . '\b'' --hilite-search" man ' . 'modprobe.d' |
           \ redraw!
   elseif has('terminal')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 ModconfKeywordPrg
           \ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'modprobe.d'
   endif
-  if exists(':Sman') == 2
+  if exists(':ModconfKeywordPrg') == 2
     setlocal iskeyword+=-
-    setlocal keywordprg=:Sman
-    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman'
+    setlocal keywordprg=:ModconfKeywordPrg
+    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ModconfKeywordPrg'
   endif
 endif
 
index 7a4eb7a8bb959abb49e4f5ed533d2a85ce7492d9..c9f6df31d06980e9e4882572eae44fc64f7807ba 100644 (file)
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:             mutt RC File
 " Previous Maintainer:  Nikolai Weibull <now@bitwi.se>
-" Latest Revision:      2006-04-19
+" Latest Revision:      2023-10-07
 
 if exists("b:did_ftplugin")
   finish
@@ -20,17 +20,17 @@ let &l:include = '^\s*source\>'
 
 if has('unix') && executable('less')
   if !has('gui_running')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 MuttrcKeywordPrg
           \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+' . <q-args> . '\b'' --hilite-search" man ' . 'muttrc' |
           \ redraw!
   elseif has('terminal')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 MuttrcKeywordPrg
           \ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'muttrc'
   endif
-  if exists(':Sman') == 2
+  if exists(':MuttrcKeywordPrg') == 2
     setlocal iskeyword+=-
-    setlocal keywordprg=:Sman
-    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman'
+    setlocal keywordprg=:MuttrcKeywordPrg
+    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer MuttrcKeywordPrg'
   endif
 endif
 
index a696da2701cb7a96d53434186232d07cc596b208..181d8ac661a917431c7592b877b329cb7c648027 100644 (file)
@@ -32,17 +32,17 @@ endif
 
 if has('unix') && executable('less')
   if !has('gui_running')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 ReadlineKeywordPrg
           \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+' . <q-args> . '\b'' --hilite-search" man ' . '3 readline' |
           \ redraw!
   elseif has('terminal')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 ReadlineKeywordPrg
           \ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . '3 readline'
   endif
-  if exists(':Sman') == 2
+  if exists(':ReadlineKeywordPrg') == 2
     setlocal iskeyword+=-
-    setlocal keywordprg=:Sman
-    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman'
+    setlocal keywordprg=:ReadlineKeywordPrg
+    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ReadlineKeywordPrg'
   endif
 endif
 
index c9a5cfaa689a72e496dc6b86156d87bb9c773088..4a054da52f334450ddc141788433337bf2636928 100644 (file)
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:         OpenSSH client configuration file
 " Previous Maintainer:       Nikolai Weibull <now@bitwi.se>
-" Latest Revision:  2008-07-09
+" Latest Revision:  2023-10-07
 
 if exists("b:did_ftplugin")
   finish
@@ -16,17 +16,17 @@ let b:undo_ftplugin = 'setlocal com< cms< fo<'
 
 if has('unix') && executable('less')
   if !has('gui_running')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 SshconfigKeywordPrg
           \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+' . <q-args> . '$'' --hilite-search" man ' . 'ssh_config' |
           \ redraw!
   elseif has('terminal')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 SshconfigKeywordPrg
           \ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '$', '\') . ''' --hilite-search" man ' . 'ssh_config'
   endif
-  if exists(':Sman') == 2
+  if exists(':SshconfigKeywordPrg') == 2
     setlocal iskeyword+=-
-    setlocal keywordprg=:Sman
-    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman'
+    setlocal keywordprg=:SshconfigKeywordPrg
+    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SshconfigKeywordPrg'
   endif
 endif
 
index b4123620af7f7900ab7760778288b8afc85a6c98..81ce7906a951e2286abef228e144139d64b933ae 100644 (file)
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:             sudoers(5) configuration files
 " Previous Maintainer:  Nikolai Weibull <now@bitwi.se>
-" Latest Revision:      2008-07-09
+" Latest Revision:      2023-10-07
 
 if exists("b:did_ftplugin")
   finish
@@ -17,17 +17,17 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
 
 if has('unix') && executable('less')
   if !has('gui_running')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 SudoersKeywordPrg
           \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''\b' . <q-args> . '\b'' --hilite-search" man ' . 'sudoers' |
           \ redraw!
   elseif has('terminal')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 SudoersKeywordPrg
           \ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('\b' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'sudoers'
   endif
-  if exists(':Sman') == 2
+  if exists(':SudoersKeywordPrg') == 2
     setlocal iskeyword+=-
-    setlocal keywordprg=:Sman
-    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman'
+    setlocal keywordprg=:SudoersKeywordPrg
+    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SudoersKeywordPrg'
   endif
 endif
 
index e60a5e496051358ec1f11bb78953a75aa308e17c..8bcacdd381e8301209cb71bf555051fac310ee28 100644 (file)
@@ -1,6 +1,7 @@
 " Vim filetype plugin file
 " Language:                    systemd.unit(5)
 " Keyword Lookup Support:      Enno Nagel <enno.nagel+vim@gmail.com>
+" Latest Revision:      2023-10-07
 
 if !exists('b:did_ftplugin')
   " Looks a lot like dosini files.
@@ -9,11 +10,11 @@ endif
 
 if has('unix') && executable('less')
   if !has('gui_running')
-    command -buffer -nargs=1 Sman silent exe '!' . KeywordLookup_systemd(<q-args>) | redraw!
+    command -buffer -nargs=1 SystemdKeywordPrg silent exe '!' . KeywordLookup_systemd(<q-args>) | redraw!
   elseif has('terminal')
-    command -buffer -nargs=1 Sman silent exe 'term ' . KeywordLookup_systemd(<q-args>)
+    command -buffer -nargs=1 SystemdKeywordPrg silent exe 'term ' . KeywordLookup_systemd(<q-args>)
   endif
-  if exists(':Sman') == 2
+  if exists(':SystemdKeywordPrg') == 2
     if !exists('*KeywordLookup_systemd')
       function KeywordLookup_systemd(keyword) abort
         let matches = matchlist(getline(search('\v^\s*\[\s*.+\s*\]\s*$', 'nbWz')), '\v^\s*\[\s*(\k+).*\]\s*$')
@@ -26,11 +27,11 @@ if has('unix') && executable('less')
       endfunction
     endif
     setlocal iskeyword+=-
-    setlocal keywordprg=:Sman
+    setlocal keywordprg=:SystemdKeywordPrg
     if !exists('b:undo_ftplugin') || empty(b:undo_ftplugin)
       let b:undo_ftplugin = 'setlocal keywordprg< iskeyword<'
     else
-      let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman'
+      let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SystemdKeywordPrg'
     endif
   endif
 endif
index 83fb728a54dc9c7d03275f578ab8045290906eb0..ec365f04c273c650551db52b1253b916805900f9 100644 (file)
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:             udev(8) rules file
 " Previous Maintainer:  Nikolai Weibull <now@bitwi.se>
-" Latest Revision:      2008-07-09
+" Latest Revision:      2023-10-07
 
 if exists("b:did_ftplugin")
   finish
@@ -17,17 +17,17 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
 
 if has('unix') && executable('less')
   if !has('gui_running')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 UdevrulesKeywordPrg
           \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s{,8}' . <q-args> . '\b'' --hilite-search" man ' . 'udev' |
           \ redraw!
   elseif has('terminal')
-    command -buffer -nargs=1 Sman
+    command -buffer -nargs=1 UdevrulesKeywordPrg
           \ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'udev'
   endif
-  if exists(':Sman') == 2
+  if exists(':UdevrulesKeywordPrg') == 2
     setlocal iskeyword+=-
-    setlocal keywordprg=:Sman
-    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman'
+    setlocal keywordprg=:UdevrulesKeywordPrg
+    let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer UdevrulesKeywordPrg'
   endif
 endif
 
index ed75d040036e41187f4cb9dc464016bf37a2bf40..40986fccbee7db9835ed0f681b424f110f329b85 100644 (file)
@@ -2,7 +2,7 @@
 " Language:             Zsh shell script
 " Maintainer:           Christian Brabandt <cb@256bit.org>
 " Previous Maintainer:  Nikolai Weibull <now@bitwi.se>
-" Latest Revision:      2021-04-03
+" Latest Revision:      2023-10-07
 " License:              Vim (see :h license)
 " Repository:           https://github.com/chrisbra/vim-zsh
 
@@ -20,17 +20,17 @@ let b:undo_ftplugin = "setl com< cms< fo< "
 
 if executable('zsh') && &shell !~# '/\%(nologin\|false\)$'
   if !has('gui_running') && executable('less')
-    command! -buffer -nargs=1 RunHelp silent exe '!MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null | LESS= less"' | redraw!
+    command! -buffer -nargs=1 ZshKeywordPrg silent exe '!MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null | LESS= less"' | redraw!
   elseif has('terminal')
-    command! -buffer -nargs=1 RunHelp silent exe ':term zsh -c "autoload -Uz run-help; run-help <args>"'
+    command! -buffer -nargs=1 ZshKeywordPrg silent exe ':term zsh -c "autoload -Uz run-help; run-help <args>"'
   else
-    command! -buffer -nargs=1 RunHelp echo system('zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
+    command! -buffer -nargs=1 ZshKeywordPrg echo system('zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
   endif
   if !exists('current_compiler')
     compiler zsh
   endif
-  setlocal keywordprg=:RunHelp
-  let b:undo_ftplugin .= 'keywordprg< | sil! delc -buffer RunHelp'
+  setlocal keywordprg=:ZshKeywordPrg
+  let b:undo_ftplugin .= 'keywordprg< | sil! delc -buffer ZshKeywordPrg'
 endif
 
 let b:match_words = '\<if\>:\<elif\>:\<else\>:\<fi\>'