rst: extract a temp var to a query
This commit is contained in:
parent
3049323c74
commit
6acff371af
@ -18,9 +18,8 @@ function! SyntaxCheckers_rst_rst2pseudoxml_IsAvailable()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList()
|
function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList()
|
||||||
let s:executable = executable("rst2pseudoxml.py") ? "rst2pseudoxml.py" : "rst2pseudoxml"
|
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': s:executable,
|
\ 'exe': s:exe(),
|
||||||
\ 'args': '--report=2 --exit-status=1',
|
\ 'args': '--report=2 --exit-status=1',
|
||||||
\ 'tail': syntastic#util#DevNull() })
|
\ 'tail': syntastic#util#DevNull() })
|
||||||
|
|
||||||
@ -33,6 +32,10 @@ function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList()
|
|||||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function s:exe()
|
||||||
|
return executable("rst2pseudoxml.py") ? "rst2pseudoxml.py" : "rst2pseudoxml"
|
||||||
|
endfunction
|
||||||
|
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
\ 'filetype': 'rst',
|
\ 'filetype': 'rst',
|
||||||
\ 'name': 'rst2pseudoxml'})
|
\ 'name': 'rst2pseudoxml'})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user