diff --git a/syntax_checkers/rst/rst2pseudoxml.vim b/syntax_checkers/rst/rst2pseudoxml.vim index ea6cfbbb..7a4cdedb 100644 --- a/syntax_checkers/rst/rst2pseudoxml.vim +++ b/syntax_checkers/rst/rst2pseudoxml.vim @@ -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'})