summaryrefslogtreecommitdiff
path: root/cider-debug.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-08-30 02:13:31 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-08-30 02:25:35 +0100
commite16342587084f57fffbb9afd8f818c27c901ae8a (patch)
treec530c6cb1c65d852a011a7c90a7c7ed01af2bdd7 /cider-debug.el
parent095d5ab7d7aace37a443b9205a155e345cb28d3e (diff)
Make relevant-connection a little smarter, and rename it to current-connection
Diffstat (limited to 'cider-debug.el')
-rw-r--r--cider-debug.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/cider-debug.el b/cider-debug.el
index c0fec976..77239704 100644
--- a/cider-debug.el
+++ b/cider-debug.el
@@ -120,7 +120,8 @@ This variable must be set before starting the repl connection."
(defun cider--debug-handle-instrumented-defs (defs ns)
"Update display of NS according to instrumented DEFS."
(-when-let (buf (-first (lambda (b) (with-current-buffer b
- (string= ns (cider-current-ns))))
+ (and (derived-mode-p 'clojure-mode)
+ (string= ns (cider-current-ns)))))
(buffer-list)))
(with-current-buffer buf
(cider--update-instrumented-defs defs))))
@@ -335,7 +336,7 @@ In order to work properly, this mode must be activated by
;; cider-nrepl has a chance to send the next message, and so that the user
;; doesn't accidentally hit `n' between two messages (thus editing the code).
(-when-let (proc (unless nrepl-ongoing-sync-request
- (get-buffer-process (cider-find-relevant-connection))))
+ (get-buffer-process (cider-current-connection))))
;; This is for the `:done' sent in reply to the debug-input we provided.
(when (accept-process-output proc 0.2)
;; This is for actually waiting for the next message.