]> Cypherpunks repositories - gostls13.git/commitdiff
misc/emacs: correctly fontify methods when go-fontify-function-calls is nil
authorDominik Honnef <dominik.honnef@gmail.com>
Wed, 12 Mar 2014 15:02:42 +0000 (11:02 -0400)
committerAlan Donovan <adonovan@google.com>
Wed, 12 Mar 2014 15:02:42 +0000 (11:02 -0400)
We were fontifying the wrong part of method declarations

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/66120043

misc/emacs/go-mode.el

index e19dcdcde8c5b9e3d678f249d8adf7878e939185..c55d83ac6a40b3cc6725531000d1b34e1a558460 100644 (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