Bring $JAVA_CMD inline

This commit is contained in:
Tim Pope 2013-01-06 19:53:37 -05:00
parent 8ad87d4fba
commit 4c60151330

View File

@ -247,10 +247,6 @@ augroup END
" }}}1 " }}}1
" Java runner {{{1 " Java runner {{{1
if !exists('g:java_cmd')
let g:java_cmd = exists('$JAVA_CMD') ? $JAVA_CMD : 'java'
endif
let s:oneoff = {} let s:oneoff = {}
function! s:oneoff.path() dict abort function! s:oneoff.path() dict abort
@ -281,7 +277,8 @@ function! s:oneoff.eval(expr, options) dict abort
call writefile(split('(do '.a:expr.')', "\n"), s:oneoff_in, 'b') call writefile(split('(do '.a:expr.')', "\n"), s:oneoff_in, 'b')
call writefile([], s:oneoff_out, 'b') call writefile([], s:oneoff_out, 'b')
call writefile([], s:oneoff_err, 'b') call writefile([], s:oneoff_err, 'b')
let command = g:java_cmd.' -cp '.shellescape(self.classpath).' clojure.main -e ' . let java_cmd = exists('$JAVA_CMD') ? $JAVA_CMD : 'java'
let command = java_cmd.' -cp '.shellescape(self.classpath).' clojure.main -e ' .
\ shellescape( \ shellescape(
\ '(binding [*out* (java.io.FileWriter. '.s:str(s:oneoff_out).')' . \ '(binding [*out* (java.io.FileWriter. '.s:str(s:oneoff_out).')' .
\ ' *err* (java.io.FileWriter. '.s:str(s:oneoff_err).')]' . \ ' *err* (java.io.FileWriter. '.s:str(s:oneoff_err).')]' .