File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 5
5
### Bugs fixed
6
6
7
7
* Dynamic vars whose names contain non-alphanumeric characters are now font-locked correctly.
8
+ * [ #508 ] ( https://github.com/clojure-emacs/clojure-mode/issues/508 ) : Fix font lock for namespaces with metadata
8
9
9
10
## 5.10.0 (2019-01-05)
10
11
Original file line number Diff line number Diff line change @@ -861,8 +861,8 @@ any number of matches of `clojure--sym-forbidden-rest-chars'."))
861
861
862
862
; ; namespace definitions: (ns foo.bar)
863
863
(,(concat " (\\ <ns\\ >[ \r\n\t ]*"
864
- ; ; Possibly metadata
865
- " \\ (?:\\ ^?{[^}]+}[ \r\n\t ]*\\ )*"
864
+ ; ; Possibly metadata, shorthand and/or longhand
865
+ " \\ (?:\\ ^?\\ (?: {[^}]+}\\ |:[^ \r\n\t ]+[ \r\n\t ] \\ ) [ \r\n\t ]*\\ )*"
866
866
; ; namespace
867
867
" \\ (" clojure--sym-regexp " \\ )" )
868
868
(1 font-lock-type-face ))
Original file line number Diff line number Diff line change @@ -149,7 +149,14 @@ POS."
149
149
(should (eq (clojure-test-face-at 5 11 " (ns Foo-bar)" ) 'font-lock-type-face ))
150
150
(should (eq (clojure-test-face-at 5 11 " (ns Foo-Bar)" ) 'font-lock-type-face ))
151
151
(should (eq (clojure-test-face-at 5 11 " (ns foo-Bar)" ) 'font-lock-type-face ))
152
- (should (eq (clojure-test-face-at 5 9 " (ns one.X)" ) 'font-lock-type-face )))
152
+ (should (eq (clojure-test-face-at 5 9 " (ns one.X)" ) 'font-lock-type-face ))
153
+ (should (eq (clojure-test-face-at 10 16 " (ns ^:md ns-name)" ) 'font-lock-type-face ))
154
+ (should (eq (clojure-test-face-at 13 19 " (ns ^:md \n ns-name)" ) 'font-lock-type-face ))
155
+ (should (eq (clojure-test-face-at 17 23 " (ns ^:md1 ^:md2 ns-name)" ) 'font-lock-type-face ))
156
+ (should (eq (clojure-test-face-at 24 30 " (ns ^:md1 ^{:md2 true} ns-name)" ) 'font-lock-type-face ))
157
+ (should (eq (clojure-test-face-at 24 30 " (ns ^{:md2 true} ^:md1 ns-name)" ) 'font-lock-type-face ))
158
+ (should (eq (clojure-test-face-at 27 33 " (ns ^:md1 ^{:md2 true} \n ns-name)" ) 'font-lock-type-face ))
159
+ (should (eq (clojure-test-face-at 27 33 " (ns ^{:md2 true} ^:md1 \n ns-name)" ) 'font-lock-type-face )))
153
160
154
161
(ert-deftest clojure-mode-syntax-table/oneword ()
155
162
:tags '(fontification syntax-table)
You can’t perform that action at this time.
0 commit comments