emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/inf-clojure 86d0b60 158/313: Adopt find-ns for detecting t


From: ELPA Syncer
Subject: [nongnu] elpa/inf-clojure 86d0b60 158/313: Adopt find-ns for detecting the repl type
Date: Wed, 11 Aug 2021 10:00:07 -0400 (EDT)

branch: elpa/inf-clojure
commit 86d0b60240579ea4e4f9b9b3d09914c074fe3b87
Author: Andrea Richiardi <a.richiardi.work@gmail.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    Adopt find-ns for detecting the repl type
---
 inf-clojure.el | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/inf-clojure.el b/inf-clojure.el
index dac3e81..f319d6e 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -228,8 +228,8 @@ See 
http://blog.jorgenschaefer.de/2014/05/race-conditions-in-emacs-process-filte
   (when (not inf-clojure--repl-type-lock)
     (let ((inf-clojure--repl-type-lock t))
       (cond
-       ((inf-clojure--lumo-p proc) 'lumo)
-       ((inf-clojure--planck-p proc) 'planck)
+       ((inf-clojure--some-response-p proc inf-clojure--lumo-repl-form) 'lumo)
+       ((inf-clojure--some-response-p proc inf-clojure--planck-repl-form) 
'planck)
        (t 'clojure)))))
 
 (defun inf-clojure--set-repl-type (proc)
@@ -1307,35 +1307,20 @@ for evaluation, therefore FORM should not include it."
 ;;;; ====
 
 (defcustom inf-clojure--lumo-repl-form
-  "(js/global.hasOwnProperty \"$$LUMO_GLOBALS\")"
+  "(find-ns 'lumo.repl)"
   "Form to invoke in order to verify that we launched a Lumo REPL."
   :type 'string
   :package-version '(inf-clojure . "2.0.0"))
 
-(defalias 'inf-clojure--lumo-p
-  (apply-partially 'inf-clojure--response-match-p
-                   inf-clojure--lumo-repl-form
-                   (lambda (string)
-                     (string-match-p "\\Ca*true\\Ca*" string)))
-  "Ascertain that PROC is a Lumo REPL.")
-
-
 ;;;; Planck
 ;;;; ====
 
 (defcustom inf-clojure--planck-repl-form
-  "(js/global.hasOwnProperty \"PLANCK_VERSION\")"
+  "(find-ns 'planck.repl)"
   "Form to invoke in order to verify that we launched a Planck REPL."
   :type 'string
   :package-version '(inf-clojure . "2.0.0"))
 
-(defalias 'inf-clojure--planck-p
-  (apply-partially 'inf-clojure--response-match-p
-                   inf-clojure--planck-repl-form
-                   (lambda (string)
-                     (string-match-p "\\Ca*true\\Ca*" string)))
-  "Ascertain that PROC is a Planck REPL.")
-
 (provide 'inf-clojure)
 
 ;; Local variables:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]