check all subfiletypes if &ft = "foo.bar"

This commit is contained in:
Martin Grenfell 2009-07-12 12:07:26 +12:00
parent 00f8718f6e
commit 23a3edb4ed

View File

@ -121,7 +121,8 @@ endfunction
function! s:CacheErrors()
let b:syntastic_qflist = []
if exists("*SyntaxCheckers_". &ft ."_GetQFList") && filereadable(expand("%"))
for ft in split(&ft, '\.')
if exists("*SyntaxCheckers_". ft ."_GetQFList") && filereadable(expand("%"))
let oldqfixlist = getqflist()
let old_makeprg = &makeprg
let old_shellpipe = &shellpipe
@ -133,13 +134,14 @@ function! s:CacheErrors()
let &shellpipe='&>'
endif
let b:syntastic_qflist = SyntaxCheckers_{&ft}_GetQFList()
let b:syntastic_qflist = extend(b:syntastic_qflist, SyntaxCheckers_{ft}_GetQFList())
call setqflist(oldqfixlist)
let &makeprg = old_makeprg
let &errorformat = old_errorformat
let &shellpipe=old_shellpipe
endif
endfor
endfunction
"return true if there are cached errors for this buf