From 2cd9a7fc90f1ad87d0d4d6329810be43b7c9ba65 Mon Sep 17 00:00:00 2001 From: dan sutton Date: Sat, 12 Oct 2019 09:37:46 -0500 Subject: [PATCH] Include ns when requiring repl utils --- CHANGELOG.md | 3 +++ cider-repl.el | 2 +- test/cider-repl-tests.el | 6 ++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7fdd25f3..439d1987c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## master (unreleased) +### Bugs fixed +* [#2730](https://github.com/clojure-emacs/cider/pull/2730) Require repl utilities into current namespace not just user ns + ## 0.23.0 (2019-10-08) ### New features diff --git a/cider-repl.el b/cider-repl.el index e112ee414..52dc84d37 100644 --- a/cider-repl.el +++ b/cider-repl.el @@ -262,7 +262,7 @@ This cache is stored in the connection buffer.") (require-code (cdr (assoc (cider-repl-type current-repl) cider-repl-require-repl-utils-code)))) (nrepl-send-sync-request (lax-plist-put - (nrepl--eval-request require-code) + (nrepl--eval-request require-code (cider-current-ns)) "inhibit-cider-middleware" "true") current-repl))) diff --git a/test/cider-repl-tests.el b/test/cider-repl-tests.el index 3eaaf0523..330d4e28f 100644 --- a/test/cider-repl-tests.el +++ b/test/cider-repl-tests.el @@ -211,8 +211,10 @@ PROPERTY should be a symbol of either 'text, 'ansi-context or (it "requires clj utils in a clj buffer" (spy-on 'cider-repl-type :and-return-value 'clj) (cider-repl-require-repl-utils) - (expect 'nrepl--eval-request :to-have-been-called-with (cdr (assoc 'clj cider-repl-require-repl-utils-code)))) + (expect 'nrepl--eval-request :to-have-been-called-with + (cdr (assoc 'clj cider-repl-require-repl-utils-code)) "user")) (it "requires cljs utils in a cljs buffer" (spy-on 'cider-repl-type :and-return-value 'cljs) (cider-repl-require-repl-utils) - (expect 'nrepl--eval-request :to-have-been-called-with (cdr (assoc 'cljs cider-repl-require-repl-utils-code))))) + (expect 'nrepl--eval-request :to-have-been-called-with + (cdr (assoc 'cljs cider-repl-require-repl-utils-code)) "user")))