misc/emacs: fix go-mode hang

Fix suggested by serbaut.

Fixes #4445.

R=sameer
CC=golang-dev, serbaut
https://golang.org/cl/6842102
This commit is contained in:
Russ Cox 2012-11-27 12:21:10 -05:00
parent b46de71457
commit a93b15cad9

View file

@ -432,7 +432,7 @@ if no further tokens of the type exist."
(if (or (>= (point) limit) (eobp))
(setq result nil)
(setq cs (go-mode-cs))
(if cs
(if (and cs (>= (car cs) (point)))
(if (eq (= (char-after (car cs)) ?/) comment)
;; If inside the expected comment/string, highlight it.
(progn