Rename functions again
This commit is contained in:
parent
a1068949b1
commit
eff7bcec61
@ -476,7 +476,7 @@ function! s:qfhistory() abort
|
|||||||
return list
|
return list
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! foreplay#eval_pr_str(expr) abort
|
function! foreplay#session_eval(expr) abort
|
||||||
let response = s:eval(a:expr, {'session': 1})
|
let response = s:eval(a:expr, {'session': 1})
|
||||||
|
|
||||||
if !empty(get(response, 'value', ''))
|
if !empty(get(response, 'value', ''))
|
||||||
@ -511,19 +511,19 @@ function! foreplay#eval_pr_str(expr) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! foreplay#eval(expr) abort
|
function! foreplay#eval(expr) abort
|
||||||
return foreplay#eval_pr_str(a:expr)
|
return foreplay#session_eval(a:expr)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! foreplay#eval_prn(expr) abort
|
function! foreplay#echo_session_eval(expr) abort
|
||||||
try
|
try
|
||||||
echo foreplay#eval_pr_str(a:expr)
|
echo foreplay#session_eval(a:expr)
|
||||||
catch /^Clojure:/
|
catch /^Clojure:/
|
||||||
endtry
|
endtry
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! foreplay#evalprint(expr) abort
|
function! foreplay#evalprint(expr) abort
|
||||||
return foreplay#eval_prn(a:expr)
|
return foreplay#echo_session_eval(a:expr)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let g:foreplay#reader =
|
let g:foreplay#reader =
|
||||||
@ -590,7 +590,7 @@ function! s:filterop(type) abort
|
|||||||
let reg_save = @@
|
let reg_save = @@
|
||||||
try
|
try
|
||||||
let expr = s:opfunc(a:type)
|
let expr = s:opfunc(a:type)
|
||||||
let @@ = matchstr(expr, '^\n\+').foreplay#eval_pr_str(expr).matchstr(expr, '\n\+$')
|
let @@ = matchstr(expr, '^\n\+').foreplay#session_eval(expr).matchstr(expr, '\n\+$')
|
||||||
if @@ !~# '^\n*$'
|
if @@ !~# '^\n*$'
|
||||||
normal! gvp
|
normal! gvp
|
||||||
endif
|
endif
|
||||||
@ -607,7 +607,7 @@ function! s:printop(type) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:print_last() abort
|
function! s:print_last() abort
|
||||||
call foreplay#eval_prn(s:todo)
|
call foreplay#echo_session_eval(s:todo)
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -615,7 +615,7 @@ function! s:editop(type) abort
|
|||||||
call feedkeys(&cedit . "\<Home>", 'n')
|
call feedkeys(&cedit . "\<Home>", 'n')
|
||||||
let input = s:input(substitute(substitute(s:opfunc(a:type), "\s*;[^\n]*", '', 'g'), '\n\+\s*', ' ', 'g'))
|
let input = s:input(substitute(substitute(s:opfunc(a:type), "\s*;[^\n]*", '', 'g'), '\n\+\s*', ' ', 'g'))
|
||||||
if input !=# ''
|
if input !=# ''
|
||||||
call foreplay#eval_prn(input)
|
call foreplay#echo_session_eval(input)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -641,7 +641,7 @@ function! s:Eval(bang, line1, line2, count, args) abort
|
|||||||
endif
|
endif
|
||||||
if a:bang
|
if a:bang
|
||||||
try
|
try
|
||||||
let result = foreplay#eval_pr_str(expr)
|
let result = foreplay#session_eval(expr)
|
||||||
if a:args !=# ''
|
if a:args !=# ''
|
||||||
call append(a:line1, result)
|
call append(a:line1, result)
|
||||||
exe a:line1
|
exe a:line1
|
||||||
@ -652,7 +652,7 @@ function! s:Eval(bang, line1, line2, count, args) abort
|
|||||||
catch /^Clojure:/
|
catch /^Clojure:/
|
||||||
endtry
|
endtry
|
||||||
else
|
else
|
||||||
call foreplay#eval_prn(expr)
|
call foreplay#echo_session_eval(expr)
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
@ -697,7 +697,7 @@ function! s:inputeval() abort
|
|||||||
let input = s:input('')
|
let input = s:input('')
|
||||||
redraw
|
redraw
|
||||||
if input !=# ''
|
if input !=# ''
|
||||||
call foreplay#eval_prn(input)
|
call foreplay#echo_session_eval(input)
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
@ -709,7 +709,7 @@ function! s:recall() abort
|
|||||||
if input =~# '^(\=$'
|
if input =~# '^(\=$'
|
||||||
return ''
|
return ''
|
||||||
else
|
else
|
||||||
return foreplay#eval_pr_str(input)
|
return foreplay#session_eval(input)
|
||||||
endif
|
endif
|
||||||
catch /^Clojure:/
|
catch /^Clojure:/
|
||||||
return ''
|
return ''
|
||||||
@ -814,7 +814,7 @@ function! s:Require(bang, ns)
|
|||||||
let cmd = ('(require '.s:qsym(a:ns ==# '' ? foreplay#ns() : a:ns).' :reload'.(a:bang ? '-all' : '').')')
|
let cmd = ('(require '.s:qsym(a:ns ==# '' ? foreplay#ns() : a:ns).' :reload'.(a:bang ? '-all' : '').')')
|
||||||
echo cmd
|
echo cmd
|
||||||
try
|
try
|
||||||
call foreplay#eval_pr_str(cmd)
|
call foreplay#session_eval(cmd)
|
||||||
return ''
|
return ''
|
||||||
catch /^Clojure:.*/
|
catch /^Clojure:.*/
|
||||||
return ''
|
return ''
|
||||||
@ -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#eval_pr_str("(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("(require '".a:ns.") (clojure.core/eval (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
|
||||||
|
Loading…
Reference in New Issue
Block a user