swift-emacs / swift-mode

Emacs support for Apple's Swift programming language.
GNU General Public License v3.0
363 stars 47 forks source link

Function declarations get tagged with function-call-face #174

Closed fermata101 closed 2 years ago

fermata101 commented 2 years ago

Function declarations should be getting tagged with the property swift-mode:function-name-face. Instead, they are incorrectly tagged with swift-mode:function-call-face (as can be observed by doing M-x describe-text-properties with cursor on the function name.)

By default, both faces inherit from Emacs' default font-lock-function-name-face. However, I prefer to highlight function declarations but not function calls.

I found that a simple fix was to swap the definitions of the two faces in swift-mode-font-lock.el, so that function-name-face comes before function-call-face. This fixed it for me.

taku0 commented 2 years ago

Fixed. Thank you for reporting.