From 2ed217a0597280c628b8c9e7a61125275b5d956d Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Sat, 11 Jul 2015 16:36:09 +0200 Subject: [PATCH] Remove deprecated functions like a boss. --- autoload/UltiSnips.vim | 24 ------------------------ plugin/UltiSnips.vim | 41 ----------------------------------------- 2 files changed, 65 deletions(-) diff --git a/autoload/UltiSnips.vim b/autoload/UltiSnips.vim index a96965b..2c004d4 100644 --- a/autoload/UltiSnips.vim +++ b/autoload/UltiSnips.vim @@ -7,18 +7,6 @@ let b:did_autoload_ultisnips = 1 exec g:_uspy "import vim" exec g:_uspy "from UltiSnips import UltiSnips_Manager" -if !exists("g:_uspy") - " Delete the autocommands defined in plugin/UltiSnips.vim and - " ftdetect/UltiSnips.vim. - augroup UltiSnips - au! - augroup END - augroup UltiSnipsFileType - au! - augroup END - finish -end - " FUNCTIONS {{{ function! s:compensate_for_pum() """ The CursorMovedI event is not triggered while the popup-menu is visible, @@ -125,18 +113,6 @@ function! UltiSnips#FileTypeChanged() endfunction -function! UltiSnips#AddSnippet(trigger, value, description, options, ...) - " Takes the same arguments as SnippetManager.add_snippet. - echoerr "Deprecated UltiSnips#AddSnippet called. Please use UltiSnips#AddSnippetWithPriority." | sleep 1 - exec g:_uspy "args = vim.eval(\"a:000\")" - exec g:_uspy "trigger = vim.eval(\"a:trigger\")" - exec g:_uspy "value = vim.eval(\"a:value\")" - exec g:_uspy "description = vim.eval(\"a:description\")" - exec g:_uspy "options = vim.eval(\"a:options\")" - exec g:_uspy "UltiSnips_Manager.add_snippet(trigger, value, description, options, *args)" - return "" -endfunction - function! UltiSnips#AddSnippetWithPriority(trigger, value, description, options, filetype, priority) exec g:_uspy "trigger = vim.eval(\"a:trigger\")" exec g:_uspy "value = vim.eval(\"a:value\")" diff --git a/plugin/UltiSnips.vim b/plugin/UltiSnips.vim index 3558202..7e9de94 100644 --- a/plugin/UltiSnips.vim +++ b/plugin/UltiSnips.vim @@ -46,47 +46,6 @@ command! -bang -nargs=? -complete=customlist,UltiSnips#FileTypeComplete UltiSnip command! -nargs=1 UltiSnipsAddFiletypes :call UltiSnips#AddFiletypes() -" Backwards compatible functions. Prefer the ones in autoload/. -function! UltiSnips_FileTypeChanged() - echoerr "Deprecated UltiSnips_FileTypeChanged called. Please use UltiSnips#FileTypeChanged." | sleep 1 - return UltiSnips#FileTypeChanged() -endfunction - -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#AddSnippetWithPriority." | 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 - augroup UltiSnips au! au CursorMovedI * call UltiSnips#CursorMoved()