File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
### Bugs Fixed
10
10
11
+ * Fix interactive evaluation in cljc buffers with only one connection.
11
12
* [ #2058 ] ( https://github.com/clojure-emacs/cider/pull/2058 ) Don't cache ns-forms in buffers with no such forms.
12
13
* [ #2057 ] ( https://github.com/clojure-emacs/cider/pull/2057 ) Use ` cider--font-lock-ensure ` for compatibility with Emacs 24.5.
13
14
Original file line number Diff line number Diff line change @@ -268,6 +268,7 @@ at all."
268
268
; ; that TYPE, but ultimately allow any type.
269
269
(cl-labels ((right-type-p (c type)
270
270
(when (or (not type)
271
+ (equal type " multi" )
271
272
(and (buffer-live-p c)
272
273
(equal (cider--connection-type c) type)))
273
274
c))
Original file line number Diff line number Diff line change @@ -498,3 +498,20 @@ SYMBOL is locally let-bound to the current buffer."
498
498
(spy-on 'cider-connected-p :and-return-value nil )
499
499
(spy-on 'clojure-expected-ns :and-return-value " clojure-expected-ns" )
500
500
(expect (cider-expected-ns " foo" ) :to-equal " clojure-expected-ns" )))
501
+
502
+ (describe " cider-load-file"
503
+ (it " works as expected in empty Clojure buffers"
504
+ (spy-on 'cider-request:load-file :and-return-value nil )
505
+ (with-connection-buffer " clj" b
506
+ (with-temp-buffer
507
+ (clojure-mode)
508
+ (setq buffer-file-name (make-temp-name " tmp.clj" ))
509
+ (expect (lambda () (cider-load-buffer)) :not :to-throw )))))
510
+
511
+ (describe " cider-interactive-eval"
512
+ (it " works as expected in empty Clojure buffers"
513
+ (spy-on 'cider-nrepl-request:eval :and-return-value nil )
514
+ (with-connection-buffer " clj" b
515
+ (with-temp-buffer
516
+ (clojure-mode)
517
+ (expect (lambda () (cider-interactive-eval " (+ 1)" )) :not :to-throw )))))
You can’t perform that action at this time.
0 commit comments