[PATCH 1 of 2] hgcommand.vim: doc install delete into "black hole", g: prefix global vars
Benoit Boissinot
bboissin at gmail.com
Thu Oct 26 07:06:18 UTC 2006
On 10/25/06, Christian Ebert <blacktrash at gmx.net> wrote:
> # HG changeset patch
> # User Christian Ebert <blacktrash at gmx.net>
> # Date 1161802790 -7200
> # Node ID 339a5ac10240266a906fe240551bdf18ade8aa7b
> # Parent 9383af6f236d1e9c5dcbc7d9b6145adb1aff0eb8
> hgcommand.vim: doc install delete into "black hole", g: prefix global vars.
>
I "feel" it's ok, but I would prefer someone with vim knowledge to ack it :)
Mathieu ?
regards,
Benoit
> diff -r 9383af6f236d -r 339a5ac10240 contrib/vim/hgcommand.vim
> --- a/contrib/vim/hgcommand.vim Wed Oct 25 18:45:18 2006 +0200
> +++ b/contrib/vim/hgcommand.vim Wed Oct 25 20:59:50 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
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
More information about the Mercurial-devel
mailing list