Skip to content

Commit 063be0c

Browse files
author
Bozhidar Batsov
committed
Fix the font-lock of interop calls like getX
1 parent 0531aea commit 063be0c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

clojure-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ Called by `imenu--generic-function'."
504504
;; foo/ Foo/
505505
("\\<\\([a-zA-Z][a-z0-9_-]*\\)/" 1 font-lock-type-face)
506506
;; fooBar
507-
("\\(?:\\<\\|/\\)\\([a-z]+[A-Z]+[a-z][a-zA-Z0-9$]*\\>\\)" 1 'clojure-interop-method-face)
507+
("\\(?:\\<\\|/\\)\\([a-z]+[A-Z]+[a-zA-Z0-9$]*\\>\\)" 1 'clojure-interop-method-face)
508508
;; Highlight grouping constructs in regular expressions
509509
(clojure-mode-font-lock-regexp-groups
510510
(1 'font-lock-regexp-grouping-construct prepend))))

test/clojure-mode-test.el

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ POS."
118118
(should (eq (clojure-test-face-at 1 5) 'font-lock-type-face))
119119
(should (eq (clojure-test-face-at 7 16) 'clojure-interop-method-face))))
120120

121+
(ert-deftest clojure-mode-syntax-table/interop-method ()
122+
:tags '(fontification syntax-table)
123+
(should (eq (clojure-test-face-at 1 11 ".someMethod") 'clojure-interop-method-face))
124+
(should (eq (clojure-test-face-at 1 10 "someMethod") 'clojure-interop-method-face))
125+
(should (eq (clojure-test-face-at 1 11 "topHttpTest") 'clojure-interop-method-face))
126+
(should (eq (clojure-test-face-at 1 4 "getX") 'clojure-interop-method-face)))
127+
121128
(ert-deftest clojure-mode-syntax-table/constant ()
122129
:tags '(fontification syntax-table)
123130
(should (eq (clojure-test-face-at 1 5 "CONST") 'font-lock-constant-face))

0 commit comments

Comments
 (0)