Qualify clojure.core symbols

I was having problems with the raw use of list in the :Doc command as
well as require in :Require. Fully qualifying them fixes the issue.
This commit is contained in:
Dave Ray 2013-02-12 19:53:22 -08:00
parent 8c0eae19ab
commit 7d47c7ec4c

View File

@ -815,7 +815,7 @@ augroup END
" :Require {{{1 " :Require {{{1
function! s:Require(bang, ns) function! s:Require(bang, ns)
let cmd = ('(require '.s:qsym(a:ns ==# '' ? foreplay#ns() : a:ns).' :reload'.(a:bang ? '-all' : '').')') let cmd = ('(clojure.core/require '.s:qsym(a:ns ==# '' ? foreplay#ns() : a:ns).' :reload'.(a:bang ? '-all' : '').')')
echo cmd echo cmd
try try
call foreplay#session_eval(cmd) call foreplay#session_eval(cmd)
@ -1007,7 +1007,7 @@ endfunction
function! s:Lookup(ns, macro, arg) abort function! s:Lookup(ns, macro, arg) abort
" doc is in clojure.core in older Clojure versions " doc is in clojure.core in older Clojure versions
try try
call foreplay#session_eval("(require '".a:ns.") (clojure.core/eval (list (if (ns-resolve 'clojure.core '".a:macro.") 'clojure.core/".a:macro." '".a:ns.'/'.a:macro.") '".a:arg.'))') call foreplay#session_eval("(clojure.core/require '".a:ns.") (clojure.core/eval (clojure.core/list (if (ns-resolve 'clojure.core '".a:macro.") 'clojure.core/".a:macro." '".a:ns.'/'.a:macro.") '".a:arg.'))')
catch /^Clojure:/ catch /^Clojure:/
catch /.*/ catch /.*/
echohl ErrorMSG echohl ErrorMSG