[PATCH 1 of 2] hgcommand.vim: black hole register for doc install, g: prefix global vars
Christian Ebert
blacktrash at gmx.net
Wed Oct 25 16:34:15 UTC 2006
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1161792838 -7200
# Node ID c5b64f90621ea9654df327f3cd7875b5f20079ab
# Parent aa8f086cb14161667f230e7565464456f9c0799d
hgcommand.vim: black hole register for doc install, g: prefix global vars
diff -r aa8f086cb141 -r c5b64f90621e contrib/vim/hgcommand.vim
--- a/contrib/vim/hgcommand.vim Wed Oct 25 17:20:39 2006 +0200
+++ b/contrib/vim/hgcommand.vim Wed Oct 25 18:13:58 2006 +0200
@@ -29,10 +29,10 @@
" completes. This allows various actions to only be taken by functions after
" system initialization.
-if exists("loaded_hgcommand")
+if exists("g:loaded_hgcommand")
finish
endif
-let loaded_hgcommand = 1
+let g:loaded_hgcommand = 1
" store 'compatible' settings
let s:save_cpo = &cpo
@@ -45,7 +45,7 @@ function! s:HGCleanupOnFailure(err)
echohl WarningMsg
echomsg s:script_name . ":" a:err "Plugin not loaded"
echohl None
- let loaded_hgcommand = "no"
+ let g:loaded_hgcommand = "no"
unlet s:save_cpo s:script_name
endfunction
@@ -566,11 +566,11 @@ function! s:HGInstallDocumentation(full_
1
" Delete from first line to a line starts with
" === START_DOC
- silent 1,/^=\{3,}\s\+START_DOC\C/ d
+ silent 1,/^=\{3,}\s\+START_DOC\C/ delete _
" Delete from a line starts with
" === END_DOC
" to the end of the documents:
- silent /^=\{3,}\s\+END_DOC\C/,$ d
+ silent /^=\{3,}\s\+END_DOC\C/,$ delete _
" Add modeline for help doc: the modeline string is mangled intentionally
" to avoid it be recognized by VIM:
@@ -1048,7 +1048,7 @@ com! HGEnableBufferSetup call HGEnableBu
com! HGEnableBufferSetup call HGEnableBufferSetup()
" Allow reloading hgcommand.vim
-com! HGReload unlet! loaded_hgcommand | runtime plugin/hgcommand.vim
+com! HGReload unlet! g:loaded_hgcommand | runtime plugin/hgcommand.vim
" Section: Plugin command mappings {{{1
nnoremap <silent> <Plug>HGAdd :HGAdd<CR>
@@ -1200,7 +1200,7 @@ delfunction <SID>HGCleanupOnFailure
delfunction <SID>HGCleanupOnFailure
unlet s:script_version s:script_name
-let loaded_hgcommand=2
+let g:loaded_hgcommand=2
silent do HGCommand User HGPluginFinish
let &cpo = s:save_cpo
More information about the Mercurial-devel
mailing list