Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv13443
Modified Files:
packages.vim
Log Message:
- make Tex_pack_check() also update g:Tex_package_detected.
- Make Tex_pack_updateall() use another argument force. A recent commit
added some intelligence to Tex_pack_updateall which made it do nothing if
it had scanned this file the last time... Sometimes we might want to
force it to rescan the same file again.
Index: packages.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** packages.vim 17 Jan 2003 09:24:15 -0000 1.27
--- packages.vim 21 Jan 2003 22:15:05 -0000 1.28
***************
*** 18,23 ****
com! -nargs=* TPackage let s:retVal = Tex_pack_one(<f-args>) <bar> normal! i<C-r>=s:retVal<CR>
! com! -nargs=0 TPackageUpdate :silent! call Tex_pack_updateall()
! com! -nargs=0 TPackageUpdateAll :silent! call Tex_pack_updateall()
imap <silent> <plug> <Nop>
--- 18,23 ----
com! -nargs=* TPackage let s:retVal = Tex_pack_one(<f-args>) <bar> normal! i<C-r>=s:retVal<CR>
! com! -nargs=0 TPackageUpdate :silent! call Tex_pack_updateall(1)
! com! -nargs=0 TPackageUpdateAll :silent! call Tex_pack_updateall(1)
imap <silent> <plug> <Nop>
***************
*** 47,55 ****
if filereadable(s:path.'/dictionaries/'.a:package)
exe 'setlocal dict+='.s:path.'/dictionaries/'.a:package
! if !has("gui_running") && filereadable(s:path.'/dictionaries/'.a:package)
! \ && g:Tex_package_supported !~ a:package
let g:Tex_package_supported = g:Tex_package_supported.','.a:package
endif
endif
let g:Tex_package_supported = substitute(g:Tex_package_supported, '^,', '', '')
endfunction
--- 47,58 ----
if filereadable(s:path.'/dictionaries/'.a:package)
exe 'setlocal dict+='.s:path.'/dictionaries/'.a:package
! if filereadable(s:path.'/dictionaries/'.a:package) && g:Tex_package_supported !~ a:package
let g:Tex_package_supported = g:Tex_package_supported.','.a:package
endif
endif
+ if g:Tex_package_detected !~ '\<'.a:package.'\>'
+ let g:Tex_package_detected = g:Tex_package_detected.','.a:package
+ endif
+ let g:Tex_package_detected = substitute(g:Tex_package_detected, '^,', '', '')
let g:Tex_package_supported = substitute(g:Tex_package_supported, '^,', '', '')
endfunction
***************
*** 74,78 ****
" necessary. After that, it 'supports' and 'unsupports' packages as needed
" in such a way as to not repeat work.
! function! Tex_pack_updateall()
call Tex_Debug('+Tex_pack_updateall')
--- 77,81 ----
" necessary. After that, it 'supports' and 'unsupports' packages as needed
" in such a way as to not repeat work.
! function! Tex_pack_updateall(force)
call Tex_Debug('+Tex_pack_updateall')
***************
*** 84,88 ****
endif
" If this is the same as last time, don't repeat.
! if exists('s:lastScannedFile') &&
\ s:lastScannedFile == fname
return
--- 87,91 ----
endif
" If this is the same as last time, don't repeat.
! if !a:force && exists('s:lastScannedFile') &&
\ s:lastScannedFile == fname
return
***************
*** 503,507 ****
if g:Tex_Menus
exe 'amenu '.g:Tex_PackagesMenuLocation.'&UpdatePackage :call Tex_pack(expand("<cword>"))<cr>'
! exe 'amenu '.g:Tex_PackagesMenuLocation.'&UpdateAll :call Tex_pack_updateall()<cr>'
call Tex_pack_supp_menu()
--- 506,510 ----
if g:Tex_Menus
exe 'amenu '.g:Tex_PackagesMenuLocation.'&UpdatePackage :call Tex_pack(expand("<cword>"))<cr>'
! exe 'amenu '.g:Tex_PackagesMenuLocation.'&UpdateAll :call Tex_pack_updateall(1)<cr>'
call Tex_pack_supp_menu()
***************
*** 511,515 ****
au LatexSuite User LatexSuiteFileType
\ call Tex_Debug('packages.vim: Catching LatexSuiteFileType event') |
! \ call Tex_pack_updateall()
augroup END
--- 514,518 ----
au LatexSuite User LatexSuiteFileType
\ call Tex_Debug('packages.vim: Catching LatexSuiteFileType event') |
! \ call Tex_pack_updateall(0)
augroup END
|