File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed
src/cider/nrepl/middleware
test/clj/cider/nrepl/middleware Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 9
9
10
10
### Bugs fixed
11
11
12
+ * Fix some functions defined with ` def ` not being properly font locked when using dynamic font locking for ClojureScript.
12
13
* [ #618 ] ( https://github.com/clojure-emacs/cider-nrepl/pull/618 ) : Fix apropos to honor exclude-regexps to filter out namespaces by regex
13
14
* [ #605 ] ( https://github.com/clojure-emacs/cider-nrepl/pull/605 ) : Fix ` ns-vars-with-meta ` to return public vars.
14
15
Original file line number Diff line number Diff line change 40
40
[sym (um/relevant-meta the-meta)]))))))))
41
41
42
42
(defn- cljs-meta-with-fn
43
- " Like (:meta m) but adds {:fn true} if (:fn-var m) is true."
43
+ " Like (:meta m) but adds {:fn true} if (:fn-var m) is true, (:tag m) is
44
+ 'function, or if m does not have a :tag key."
44
45
[m]
45
46
(cond-> (:meta m)
46
- (:fn-var m) (assoc :fn true )))
47
+ (or (:fn-var m)
48
+ (= (:tag m) 'function)
49
+ (not (contains? m :tag )))
50
+ (assoc :fn true )))
47
51
48
52
; ;; Namespaces
49
53
Original file line number Diff line number Diff line change 121
121
(deftest ns-as-map-cljs-test
122
122
(let [cljs-ns {:use-macros {'sym-0 #'test-fn}
123
123
:uses {'sym-1 #'ns-as-map-cljs-test}
124
- :defs {'sym-2 #'ns-as-map-cljs-test
125
- 'a-fn {:fn-var true }
126
- 'a-var {}}
127
- :require-macros {'sym-3 'some-namespace}
128
- :requires {'sym-4 'some-namespace}}
124
+ :defs {'a-fn {:fn-var true }
125
+ 'b-fn {:tag 'function}
126
+ 'c-fn {}
127
+ 'a-var {:tag 'something}}
128
+ :require-macros {'sym-2 'some-namespace}
129
+ :requires {'sym-3 'some-namespace}}
129
130
{:keys [aliases interns]} (st/ns-as-map cljs-ns)]
130
- (is (= '{sym-3 some-namespace sym-4 some-namespace} aliases))
131
+ (is (= '{sym-2 some-namespace sym-3 some-namespace} aliases))
131
132
(is (= '{sym-0 {:arglists ([]) :macro true }
132
133
sym-1 {:arglists ([])}
133
- sym-2 {}
134
134
a-var {}
135
- a-fn {:fn " true" }}
135
+ a-fn {:fn " true" }
136
+ b-fn {:fn " true" }
137
+ c-fn {:fn " true" }}
136
138
interns))))
137
139
138
140
(deftest calculate-used-aliases-test
You can’t perform that action at this time.
0 commit comments