Merge pull request #1907 from UndeadKernel/fix_clojure-cljs-repl

lang/clojure: fix repl handler for clojurescript
This commit is contained in:
Henrik Lissner 2019-10-17 02:10:56 -04:00 committed by GitHub
commit a30cb00d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,10 +17,13 @@ at point."
"Open a Cider REPL for clojure and return the buffer."
(interactive "P")
;; TODO Better error handling
;; type is `clj' for clojure and `cljs' for clojurescript
;; ... with no type specified, assume `clj'.
(let ((type (or type 'clj)))
(if-let (buffer (cider-current-repl type))
(pop-to-buffer buffer)
(let ((process (cider-jack-in-clj arg)))
(let ((process (cond ((eq type 'clj) (cider-jack-in-clj arg))
((eq type 'cljs) (cider-jack-in-cljs arg)))))
(message "Starting CIDER server for the first time...")
(while (and (process-live-p process)
(not (cider-current-repl type)))