From a93b15cad90828a8706e79eb00e7962da09c1317 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 27 Nov 2012 12:21:10 -0500 Subject: [PATCH] misc/emacs: fix go-mode hang Fix suggested by serbaut. Fixes #4445. R=sameer CC=golang-dev, serbaut https://golang.org/cl/6842102 --- misc/emacs/go-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.48.1