1
0
mirror of https://github.com/golang/go synced 2024-11-26 14:08:37 -07:00

misc/emacs: correctly fontify methods when go-fontify-function-calls is nil

We were fontifying the wrong part of method declarations

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/66120043
This commit is contained in:
Dominik Honnef 2014-03-12 11:02:42 -04:00 committed by Alan Donovan
parent 78992439f4
commit e9ba9470bc

View File

@ -269,7 +269,7 @@ For mode=set, all covered lines will have this weight."
(if go-fontify-function-calls
`((,(concat "\\(" go-identifier-regexp "\\)[[:space:]]*(") 1 font-lock-function-name-face) ;; function call/method name
(,(concat "[^[:word:][:multibyte:]](\\(" go-identifier-regexp "\\))[[:space:]]*(") 1 font-lock-function-name-face)) ;; bracketed function call
`((,go-func-meth-regexp 1 font-lock-function-name-face))) ;; method name
`((,go-func-meth-regexp 2 font-lock-function-name-face))) ;; method name
`(
(,(concat (go--regexp-enclose-in-symbol "type") "[[:space:]]+\\([^[:space:]]+\\)") 1 font-lock-type-face) ;; types