From 4c60151330a9ee902f263454b3962ebc372a38a7 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 6 Jan 2013 19:53:37 -0500 Subject: [PATCH] Bring $JAVA_CMD inline --- plugin/foreplay.vim | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugin/foreplay.vim b/plugin/foreplay.vim index 1bf2d9e..2615200 100644 --- a/plugin/foreplay.vim +++ b/plugin/foreplay.vim @@ -247,10 +247,6 @@ augroup END " }}}1 " Java runner {{{1 -if !exists('g:java_cmd') - let g:java_cmd = exists('$JAVA_CMD') ? $JAVA_CMD : 'java' -endif - let s:oneoff = {} 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([], s:oneoff_out, '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( \ '(binding [*out* (java.io.FileWriter. '.s:str(s:oneoff_out).')' . \ ' *err* (java.io.FileWriter. '.s:str(s:oneoff_err).')]' .