Commits

Meikel Brandmeyer committed 01c8339

Use StartRepl function instead of direct Repl.New

  • Participants
  • Parent commits d4aabec

Comments (0)

Files changed (2)

File autoload/vimclojure.vim

 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

File plugin/clojure.vim

 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>