Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv16067
Modified Files:
multicompile.vim
Log Message:
- Improved behavior: If there is an error in any of the compilation steps,
return without rerunning anything else.
Index: multicompile.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/multicompile.vim,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** multicompile.vim 31 Aug 2003 09:04:41 -0000 1.4
--- multicompile.vim 2 Sep 2003 01:56:47 -0000 1.5
***************
*** 19,24 ****
endif
! let idxFileName = mainFileName_root.'.idx'
let runCount = 0
--- 19,34 ----
endif
! " First ignore undefined references and the
! " "rerun to get cross-references right" message from
! " the compiler output.
! let origlevel = g:Tex_IgnoreLevel
! let origpats = g:Tex_IgnoredWarnings
+ let g:Tex_IgnoredWarnings = g:Tex_IgnoredWarnings."\n"
+ \ . 'Reference %.%# undefined'."\n"
+ \ . 'Rerun to get cross-references right'
+ TCLevel 1000
+
+ let idxFileName = mainFileName_root.'.idx'
let runCount = 0
***************
*** 30,36 ****
let idxlinesBefore = Tex_CatFile(idxFileName)
! " first run latex once.
echomsg "latex run number : ".(runCount+1)
silent! call Tex_CompileLatex()
let idxlinesAfter = Tex_CatFile(idxFileName)
--- 40,60 ----
let idxlinesBefore = Tex_CatFile(idxFileName)
! " first run latex.
echomsg "latex run number : ".(runCount+1)
silent! call Tex_CompileLatex()
+
+ " If there are errors in any latex compilation step, immediately
+ " return.
+ let _a = @a
+ redir @a | silent! clist | redir END
+ let errlist = @a
+ let @a = _a
+
+ if errlist =~ '\d\+\s\f\+:\d\+\serror'
+ let g:Tex_IgnoredWarnings = origpats
+ exec 'TCLevel '.origlevel
+
+ return
+ endif
let idxlinesAfter = Tex_CatFile(idxFileName)
***************
*** 47,51 ****
endif
! " The first time we see if we need to run bibtex
if runCount == 0 && Tex_IsPresentInFile('\\bibdata', mainFileName_root.'.aux')
let bibFileName = mainFileName_root . '.bbl'
--- 71,76 ----
endif
! " The first time we see if we need to run bibtex and if the .bbl file
! " changes, we will rerun latex.
if runCount == 0 && Tex_IsPresentInFile('\\bibdata', mainFileName_root.'.aux')
let bibFileName = mainFileName_root . '.bbl'
***************
*** 81,84 ****
--- 106,111 ----
echomsg "Ran latex ".runCount." time(s)"
+ let g:Tex_IgnoredWarnings = origpats
+ exec 'TCLevel '.origlevel
" After all compiler calls are done, reparse the .log file for
" errors/warnings to handle the situation where the clist might have been
|