Skip to content

Commit 9371d79

Browse files
author
Bozhidar Batsov
committed
Fix the font-locking of classes in scenarios like URLDecoder/decode
1 parent ca080b9 commit 9371d79

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

clojure-mode.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,8 @@ Called by `imenu--generic-function'."
511511
;; namespace
512512
"\\([a-z0-9-]+\\)")
513513
(1 font-lock-type-face nil t))
514-
;; foo/ Foo/ @Foo/
515-
("\\(?:\\<\\|\\.\\)@?\\([a-zA-Z][a-z0-9_-]*\\)/" 1 font-lock-type-face)
514+
;; foo/ Foo/ @Foo/ /FooBar
515+
("\\(?:\\<\\|\\.\\)@?\\([a-zA-Z][a-zA-Z0-9$_-]*\\)/" 1 font-lock-type-face)
516516
;; fooBar
517517
("\\(?:\\<\\|/\\)\\([a-z]+[A-Z]+[a-zA-Z0-9$]*\\>\\)" 1 'clojure-interop-method-face)
518518
;; Highlight grouping constructs in regular expressions

test/clojure-mode-test.el

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ POS."
118118
(should (eq (clojure-test-face-at 1 5) 'font-lock-type-face))
119119
(should (eq (clojure-test-face-at 6 6) nil))
120120
(should (eq (clojure-test-face-at 7 16) 'clojure-interop-method-face)))
121+
(clojure-test-with-temp-buffer "SomeClass/methodName"
122+
(should (eq (clojure-test-face-at 1 9) 'font-lock-type-face))
123+
(should (eq (clojure-test-face-at 10 10) nil))
124+
(should (eq (clojure-test-face-at 11 20) 'clojure-interop-method-face)))
121125
(clojure-test-with-temp-buffer "clojure.lang.Var/someMethod"
122126
(should (eq (clojure-test-face-at 1 16) 'font-lock-type-face))
123127
(should (eq (clojure-test-face-at 17 17) nil))

0 commit comments

Comments
 (0)