@@ -227,8 +227,8 @@ See http://blog.jorgenschaefer.de/2014/05/race-conditions-in-emacs-process-filte
227
227
(when (not inf-clojure--repl-type-lock)
228
228
(let ((inf-clojure--repl-type-lock t ))
229
229
(cond
230
- ((inf-clojure--lumo- p proc) 'lumo )
231
- ((inf-clojure--planck- p proc) 'planck )
230
+ ((inf-clojure--non-nil-response- p proc inf-clojure--lumo-repl-form ) 'lumo )
231
+ ((inf-clojure--non-nil-response- p proc inf-clojure--planck-repl-form ) 'planck )
232
232
(t 'clojure )))))
233
233
234
234
(defun inf-clojure--set-repl-type (proc )
@@ -726,7 +726,10 @@ If you are using REPL types, it will pickup the most approapriate
726
726
(define-obsolete-variable-alias 'inf-clojure-completion-command 'inf-clojure-completion-form " 2.0.0" )
727
727
728
728
(defcustom inf-clojure-completion-form-lumo
729
- " (doall (map str (lumo.repl/get-completions \" %s\" )))"
729
+ " (let [ret (atom)]
730
+ (lumo.repl/get-completions \" %s\"
731
+ (fn [res] (reset! ret (map str res))))
732
+ @ret)"
730
733
" Lumo form to query inferior Clojure for completion candidates."
731
734
:type 'string
732
735
:package-version '(inf-clojure . " 2.0.0" ))
@@ -1248,7 +1251,7 @@ to suppress the usage of the target buffer discovery logic."
1248
1251
; ;;; ====
1249
1252
1250
1253
(defcustom inf-clojure--lumo-repl-form
1251
- " (js/global.hasOwnProperty \" $$LUMO_GLOBALS \" )"
1254
+ " (find-ns 'lumo.repl )"
1252
1255
" Form to invoke in order to verify that we launched a Lumo REPL."
1253
1256
:type 'string
1254
1257
:package-version '(inf-clojure . " 2.0.0" ))
@@ -1257,18 +1260,11 @@ to suppress the usage of the target buffer discovery logic."
1257
1260
; ;;; ====
1258
1261
1259
1262
(defcustom inf-clojure--planck-repl-form
1260
- " (js/global.hasOwnProperty \" PLANCK_VERSION \" )"
1263
+ " (find-ns 'planck.repl )"
1261
1264
" Form to invoke in order to verify that we launched a Planck REPL."
1262
1265
:type 'string
1263
1266
:package-version '(inf-clojure . " 2.0.0" ))
1264
1267
1265
- (defalias 'inf-clojure--planck-p
1266
- (apply-partially 'inf-clojure--response-match-p
1267
- inf-clojure--planck-repl-form
1268
- (lambda (string )
1269
- (string-match-p " \\ Ca*true\\ Ca*" string)))
1270
- " Ascertain that PROC is a Planck REPL." )
1271
-
1272
1268
(provide 'inf-clojure )
1273
1269
1274
1270
; ; Local variables:
0 commit comments