emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/swift-mode e246264: Fix face of function names


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode e246264: Fix face of function names
Date: Sun, 17 Oct 2021 01:57:53 -0400 (EDT)

branch: elpa/swift-mode
commit e24626440ce350596f4c1676f6644437a0500bbd
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>

    Fix face of function names
    
    Fixes https://github.com/swift-emacs/swift-mode/issues/174.
---
 swift-mode-font-lock.el                    | 10 +++++-----
 test/swift-files/font-lock/font-lock.swift |  4 ++++
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/swift-mode-font-lock.el b/swift-mode-font-lock.el
index 595554a..878d77a 100644
--- a/swift-mode-font-lock.el
+++ b/swift-mode-font-lock.el
@@ -653,16 +653,16 @@ Excludes true, false, and keywords begin with a number 
sign.")
      .
      'swift-mode:builtin-precedence-group-face)
 
-    ;; Method/function calls
-    ("\\<\\(\\(\\sw\\|\\s_\\)+\\)\\>\\??\\s-*("
-     1
-     'swift-mode:function-call-face)
-
     ;; Function and type declarations
     (swift-mode:font-lock-match-declared-function-names
      .
      'swift-mode:function-name-face)
 
+    ;; Method/function calls
+    ("\\<\\(\\(\\sw\\|\\s_\\)+\\)\\>\\??\\s-*("
+     1
+     'swift-mode:function-call-face)
+
     ;; Property accesses
     (swift-mode:font-lock-match-property-access
      .
diff --git a/test/swift-files/font-lock/font-lock.swift 
b/test/swift-files/font-lock/font-lock.swift
index 4113d74..a349ddb 100644
--- a/test/swift-files/font-lock/font-lock.swift
+++ b/test/swift-files/font-lock/font-lock.swift
@@ -55,3 +55,7 @@ foo +!+!+!+!+ bbb // "foo +!+!+!+!+ bbb"
 //
 
 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))
+
+func foo() { // #("func foo() {" 0 4 (face swift-mode:keyword-face) 5 8 (face 
swift-mode:function-name-face))
+    foo() // #("    foo()" 4 7 (face swift-mode:function-call-face))
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]