rst: extract a temp var to a query

This commit is contained in:
Martin Grenfell 2013-02-10 16:50:49 +00:00
parent 3049323c74
commit 6acff371af

View File

@ -18,9 +18,8 @@ function! SyntaxCheckers_rst_rst2pseudoxml_IsAvailable()
endfunction
function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList()
let s:executable = executable("rst2pseudoxml.py") ? "rst2pseudoxml.py" : "rst2pseudoxml"
let makeprg = syntastic#makeprg#build({
\ 'exe': s:executable,
\ 'exe': s:exe(),
\ 'args': '--report=2 --exit-status=1',
\ 'tail': syntastic#util#DevNull() })
@ -33,6 +32,10 @@ function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList()
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction
function s:exe()
return executable("rst2pseudoxml.py") ? "rst2pseudoxml.py" : "rst2pseudoxml"
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'rst',
\ 'name': 'rst2pseudoxml'})