File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 33## master (unreleased)
44
55### Changes
6-
6+ - [ # 3754 ] ( https://github.com/clojure-emacs/cider/issues/3754 ) : Fix regex in ` cider-ns-from-p ` .
77- [ #3753 ] ( https://github.com/clojure-emacs/cider/pull/3753 ) : Add ` cider-log-show-frameworks ` command to show available log frameworks in a buffer.
88- [ #3746 ] ( https://github.com/clojure-emacs/cider/issues/3746 ) : Bring back ` cider ` completion style for activating backend-driven completion.
99
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ EVAL-BUFFER is the buffer where the spinner was started."
108108; ;; Evaluation helpers
109109(defun cider-ns-form-p (form )
110110 " Check if FORM is an ns form."
111- (string-match-p " ^ [[:space:]]*\( ns\\ ([[:space:]]*$\\ |[[:space:]]+\\ )" form))
111+ (string-match-p " \\ ` [[:space:]]*\( ns\\ ([[:space:]]*$\\ |[[:space:]]+\\ )" form))
112112
113113(defun cider-ns-from-form (ns-form )
114114 " Get ns substring from NS-FORM."
Original file line number Diff line number Diff line change 132132 (expect (cider-ensure-op-supported " foo" )
133133 :to-throw 'user-error )))
134134
135+ (describe " cider-ns-form-p"
136+ (it " doesn't match ns in a string"
137+ (let ((ns-in-string " \"\n (ns bar)\n\" " ))
138+ (expect (cider-ns-form-p ns-in-string) :to-equal nil )))
139+ (it " matches ns"
140+ (let ((ns " (ns bar)\n " ))
141+ (expect (cider-ns-form-p ns) :to-equal 0 )))
142+ (it " matches ns with leading spaces"
143+ (let ((ns " (ns bar)\n " ))
144+ (expect (cider-ns-form-p ns) :to-equal 0 ))))
145+
135146(describe " cider-expected-ns"
136147 (before-each
137148 (spy-on 'cider-connected-p :and-return-value t )
You can’t perform that action at this time.
0 commit comments