]> Cypherpunks repositories - gostls13.git/commitdiff
misc/emacs: fix go-mode hang
authorRuss Cox <rsc@golang.org>
Tue, 27 Nov 2012 17:21:10 +0000 (12:21 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 27 Nov 2012 17:21:10 +0000 (12:21 -0500)
Fix suggested by serbaut.

Fixes #4445.

R=sameer
CC=golang-dev, serbaut
https://golang.org/cl/6842102

misc/emacs/go-mode.el

index d6dd644f161b1797c2f697f77588698e0381ab4e..960a3c6dc3021a864b1f7b81a06def8764f9c18e 100644 (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