Skip to content

Commit

Permalink
Use StartRepl function instead of direct Repl.New
Browse files Browse the repository at this point in the history
  • Loading branch information
kotarak committed Jul 4, 2010
1 parent f0ccf5e commit ab27f14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions autoload/vimclojure.vim
Expand Up @@ -684,8 +684,9 @@ let vimclojure#Repl._historyDepth = 0
let vimclojure#Repl._replCommands = [ ",close", ",st", ",ct", ",toggle-pprint" ]

" Simple wrapper to allow on demand load of autoload/vimclojure.vim.
function! vimclojure#StartRepl()
call g:vimclojure#Repl.New("user")
function! vimclojure#StartRepl(...)
let ns = a:0 > 0 ? a:1 : "user"
call g:vimclojure#Repl.New(ns)
endfunction

function! vimclojure#Repl.New(namespace) dict
Expand Down
4 changes: 2 additions & 2 deletions plugin/clojure.vim
Expand Up @@ -45,8 +45,8 @@ call vimclojure#MakeProtectedPlug("v", "EvalBlock", "vimclojure#EvalBlock",
call vimclojure#MakeProtectedPlug("n", "EvalToplevel", "vimclojure#EvalToplevel", "")
call vimclojure#MakeProtectedPlug("n", "EvalParagraph", "vimclojure#EvalParagraph", "")

call vimclojure#MakeProtectedPlug("n", "StartRepl", "vimclojure#Repl.New", "user")
call vimclojure#MakeProtectedPlug("n", "StartLocalRepl", "vimclojure#Repl.New", "b:vimclojure_namespace")
call vimclojure#MakeProtectedPlug("n", "StartRepl", "vimclojure#StartRepl", "")
call vimclojure#MakeProtectedPlug("n", "StartLocalRepl", "vimclojure#StartRepl", "b:vimclojure_namespace")

inoremap <Plug>ClojureReplEnterHook <Esc>:call b:vimclojure_repl.enterHook()<CR>
inoremap <Plug>ClojureReplUpHistory <C-O>:call b:vimclojure_repl.upHistory()<CR>
Expand Down

0 comments on commit ab27f14

Please sign in to comment.