Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv21304
Modified Files:
compiler.vim
Log Message:
Bug: If we used :TTarget ps, then the compiler would be called as:
dvips -o file.tex.ps file.tex.dvi
instead of
dvips -o file.ps file.dvi
Why: In a recent change, we made RunLaTeX() use filenames with extension.
However, some compilation rules might require filenames w/o extensions
(such as Tex_CompileRule_ps which is 'dvips -o $*.ps $*.dvi')
Fix: Try to guess if the &makeprg requires files w/o extensions by seeing
if it matches '\$\*\.\w\+'. If so, use file-name w/o extension.
Otherwise, retain extension in 'make '.fname
Index: compiler.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/compiler.vim,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** compiler.vim 15 Jun 2003 08:44:54 -0000 1.39
--- compiler.vim 18 Jun 2003 00:57:24 -0000 1.40
***************
*** 119,123 ****
"
" if mainfname exists, then it means it was supplied to RunLaTeX().
! let mainfname = Tex_GetMainFileName()
if exists('b:fragmentFile') || mainfname == ''
let mainfname = expand('%:t')
--- 119,124 ----
"
" if mainfname exists, then it means it was supplied to RunLaTeX().
! " Extract the complete file name including the extension.
! let mainfname = Tex_GetMainFileName(':r')
if exists('b:fragmentFile') || mainfname == ''
let mainfname = expand('%:t')
***************
*** 137,140 ****
--- 138,146 ----
let &l:makeprg = _makeprg
else
+ " If &makeprg has something like "$*.ps", it means that it wants the
+ " file-name without the extension... Therefore remove it.
+ if &makeprg =~ '\$\*\.\w\+'
+ let mainfname = fnamemodify(mainfname, ':r')
+ endif
exec 'make '.mainfname
endif
|