From: Russ Cox Date: Tue, 27 Nov 2012 17:21:10 +0000 (-0500) Subject: misc/emacs: fix go-mode hang X-Git-Tag: go1.1rc2~1769 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a93b15cad90828a8706e79eb00e7962da09c1317;p=gostls13.git misc/emacs: fix go-mode hang Fix suggested by serbaut. Fixes #4445. R=sameer CC=golang-dev, serbaut https://golang.org/cl/6842102 --- diff --git a/misc/emacs/go-mode.el b/misc/emacs/go-mode.el index d6dd644f16..960a3c6dc3 100644 --- a/misc/emacs/go-mode.el +++ b/misc/emacs/go-mode.el @@ -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