Added deprecation warnings for old functions.

This commit is contained in:
Holger Rapp 2014-02-19 20:30:46 +01:00
parent 5fa32d533e
commit d6ebf85fc8

View File

@ -18,30 +18,37 @@ command! -nargs=1 UltiSnipsAddFiletypes :call UltiSnips#AddFiletypes(<q-args>)
" Backwards compatible functions. Prefer the ones in autoload/.
function! UltiSnips_ExpandSnippet()
echoerr "Deprecated UltiSnips_ExpandSnippet called. Please use UltiSnips#ExpandSnippet." | sleep 1
return UltiSnips#ExpandSnippet()
endfunction
function! UltiSnips_ExpandSnippetOrJump()
echoerr "Deprecated UltiSnips_ExpandSnippetOrJump called. Please use UltiSnips#ExpandSnippetOrJump." | sleep 1
return UltiSnips#ExpandSnippetOrJump()
endfunction
function! UltiSnips_SnippetsInCurrentScope()
echoerr "Deprecated UltiSnips_SnippetsInCurrentScope called. Please use UltiSnips#SnippetsInCurrentScope." | sleep 1
return UltiSnips#SnippetsInCurrentScope()
endfunction
function! UltiSnips_JumpBackwards()
echoerr "Deprecated UltiSnips_JumpBackwards called. Please use UltiSnips#JumpBackwards." | sleep 1
return UltiSnips#JumpBackwards()
endfunction
function! UltiSnips_JumpForwards()
echoerr "Deprecated UltiSnips_JumpForwards called. Please use UltiSnips#JumpForwards." | sleep 1
return UltiSnips#JumpForwards()
endfunction
function! UltiSnips_AddSnippet(...)
echoerr "Deprecated UltiSnips_AddSnippet called. Please use UltiSnips#AddSnippet." | sleep 1
return call(function('UltiSnips#AddSnippet'), a:000)
endfunction
function! UltiSnips_Anon(...)
echoerr "Deprecated UltiSnips_Anon called. Please use UltiSnips#Anon." | sleep 1
return call(function('UltiSnips#Anon'), a:000)
endfunction