 
   ;; Reset the syntax mark caches
   (setq go-mode-mark-cs-end      1
-        go-mode-mark-cs-state    nil
         go-mode-mark-nesting-end 1)
-  (add-hook 'after-change-functions #'go-mode-mark-clear-cache nil t)
+  (add-hook 'before-change-functions #'go-mode-mark-clear-cache nil t)
 
   ;; Indentation
   (set (make-local-variable 'indent-line-function)

        (constants '("nil" "true" "false" "iota"))
        (type-name "\\s *\\(?:[*(]\\s *\\)*\\(?:\\w+\\s *\\.\\s *\\)?\\(\\w+\\)")
        )
    `((,(regexp-opt go-mode-keywords 'words) . font-lock-keyword-face)
      (,(regexp-opt builtins 'words) . font-lock-builtin-face)
      (,(regexp-opt constants 'words) . font-lock-constant-face)
      ;; Function names in declarations

               (progn ,@body)
             (set-buffer-modified-p ,modified-var)))))))

(defun go-mode-cs (&optional pos)
  "Return the comment/string state at point POS.  If point is
inside a comment or string (including the delimiters), this
returns a pair (START . END) indicating the extents of the
