]> Cypherpunks repositories - gostls13.git/commitdiff
misc/emacs: don't treat (foo)(bar) as a function call when preceded by a word character.
authorDominik Honnef <dominik.honnef@gmail.com>
Thu, 10 Oct 2013 20:30:20 +0000 (16:30 -0400)
committerAlan Donovan <adonovan@google.com>
Thu, 10 Oct 2013 20:30:20 +0000 (16:30 -0400)
Fixes #6531.

R=adonovan
CC=golang-dev
https://golang.org/cl/14523043

misc/emacs/go-mode.el

index 349b372ecfebe5528211e24b5924827679f966f0..1f35f7c0b43d61a77b6c4feef6a2fcaa22dc43ce 100644 (file)
@@ -249,7 +249,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 "(\\(" go-identifier-regexp "\\))[[:space:]]*(") 1 font-lock-function-name-face)) ;; bracketed function call
+         (,(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
 
    `(