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/. " Backwards compatible functions. Prefer the ones in autoload/.
function! UltiSnips_ExpandSnippet() function! UltiSnips_ExpandSnippet()
echoerr "Deprecated UltiSnips_ExpandSnippet called. Please use UltiSnips#ExpandSnippet." | sleep 1
return UltiSnips#ExpandSnippet() return UltiSnips#ExpandSnippet()
endfunction endfunction
function! UltiSnips_ExpandSnippetOrJump() function! UltiSnips_ExpandSnippetOrJump()
echoerr "Deprecated UltiSnips_ExpandSnippetOrJump called. Please use UltiSnips#ExpandSnippetOrJump." | sleep 1
return UltiSnips#ExpandSnippetOrJump() return UltiSnips#ExpandSnippetOrJump()
endfunction endfunction
function! UltiSnips_SnippetsInCurrentScope() function! UltiSnips_SnippetsInCurrentScope()
echoerr "Deprecated UltiSnips_SnippetsInCurrentScope called. Please use UltiSnips#SnippetsInCurrentScope." | sleep 1
return UltiSnips#SnippetsInCurrentScope() return UltiSnips#SnippetsInCurrentScope()
endfunction endfunction
function! UltiSnips_JumpBackwards() function! UltiSnips_JumpBackwards()
echoerr "Deprecated UltiSnips_JumpBackwards called. Please use UltiSnips#JumpBackwards." | sleep 1
return UltiSnips#JumpBackwards() return UltiSnips#JumpBackwards()
endfunction endfunction
function! UltiSnips_JumpForwards() function! UltiSnips_JumpForwards()
echoerr "Deprecated UltiSnips_JumpForwards called. Please use UltiSnips#JumpForwards." | sleep 1
return UltiSnips#JumpForwards() return UltiSnips#JumpForwards()
endfunction endfunction
function! UltiSnips_AddSnippet(...) function! UltiSnips_AddSnippet(...)
echoerr "Deprecated UltiSnips_AddSnippet called. Please use UltiSnips#AddSnippet." | sleep 1
return call(function('UltiSnips#AddSnippet'), a:000) return call(function('UltiSnips#AddSnippet'), a:000)
endfunction endfunction
function! UltiSnips_Anon(...) function! UltiSnips_Anon(...)
echoerr "Deprecated UltiSnips_Anon called. Please use UltiSnips#Anon." | sleep 1
return call(function('UltiSnips#Anon'), a:000) return call(function('UltiSnips#Anon'), a:000)
endfunction endfunction