Skip to content

Commit e246264

Browse files
committed
Fix face of function names
Fixes #174.
1 parent babe36c commit e246264

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

swift-mode-font-lock.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -653,16 +653,16 @@ Excludes true, false, and keywords begin with a number sign.")
653653
.
654654
'swift-mode:builtin-precedence-group-face)
655655

656-
;; Method/function calls
657-
("\\<\\(\\(\\sw\\|\\s_\\)+\\)\\>\\??\\s-*("
658-
1
659-
'swift-mode:function-call-face)
660-
661656
;; Function and type declarations
662657
(swift-mode:font-lock-match-declared-function-names
663658
.
664659
'swift-mode:function-name-face)
665660

661+
;; Method/function calls
662+
("\\<\\(\\(\\sw\\|\\s_\\)+\\)\\>\\??\\s-*("
663+
1
664+
'swift-mode:function-call-face)
665+
666666
;; Property accesses
667667
(swift-mode:font-lock-match-property-access
668668
.

test/swift-files/font-lock/font-lock.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,7 @@ foo +!+!+!+!+ bbb // "foo +!+!+!+!+ bbb"
5555
//
5656

5757
enum Foo: Error { .foo } // #("enum Foo: Error { .foo }" 0 4 (face swift-mode:keyword-face) 5 8 (face swift-mode:function-name-face) 10 15 (face swift-mode:builtin-type-face) 19 22 (face swift-mode:property-access-face))
58+
59+
func foo() { // #("func foo() {" 0 4 (face swift-mode:keyword-face) 5 8 (face swift-mode:function-name-face))
60+
foo() // #(" foo()" 4 7 (face swift-mode:function-call-face))
61+
}

0 commit comments

Comments
 (0)