         ;; Inside a multi-line string.  Don't mess with indentation.
         nil)
        (cs
-        ;; Inside a multi-line comment
+        ;; Inside a general comment
         (goto-char (car cs))
         (forward-char 1)
         (current-column))
-       ((not (go-mode-nesting))
-        ;; Top-level
-        (if (or (eolp)
-                (looking-at "\\<\\(import\\|package\\|const\\|var\\|type\\|func\\)\\>")
-                (looking-at "//\\|/\\*"))
-            0
-          ;; Continuation line
-          ;; XXX If you start typing a new continuation line, nothing
-          ;; will cause it to be indented.
-          tab-width))
        (t
-        ;; Neither top-level nor in a multi-line string or comment
+        ;; Not in a multi-line string or comment
         (let ((indent 0)
-              (inside-indenting-paren nil)
-              (current-line-closes-scope nil))
+              (inside-indenting-paren nil))
           ;; Count every enclosing brace, plus parens that follow
           ;; import, const, var, or type and indent according to
           ;; depth.  This simple rule does quite well, but also has a

                       (setq inside-indenting-paren t)))))
                (setq first nil))))

          (setq current-line-closes-scope
                (case (char-after)
                  ((?\} ?\)) t)
                  (t nil)))

          ;; case, default, and labels are outdented 1 level
          (when (looking-at "\\<case\\>\\|\\<default\\>\\|\\w+\\s *:\\(\\S.\\|$\\)")
            (decf indent tab-width)
            ;; Lines with case, default, etc. also "close" the previous line's 
            ;; scope, even when there is no semicolon. Don't treat them as
            ;; continuation lines.
            (setq current-line-closes-scope t))

          ;; Continuation lines are indented 1 level
          (forward-comment (- (buffer-size)))
          (when (case (char-before)
                  ((?\{ ?\} ?\; ?:)
                   ;; Not a continuation line
                   nil)
                  ((?\()
                   ;; Usually a continuation line, unless this paren
                   ;; counted towards our indentation already
                   (not inside-indenting-paren))
                  ((?,)
                   ;; Could be inside a literal.  We're a little

                     (and depth
                          (not (eq (char-after (caar depth)) ?\{)))))
                  (t
                   ;; We're in the middle of a block.  Did the
                   ;; previous line end with an implicit or explicit
                   ;; semicolon?
                   (not (go-mode-semicolon-p))))
            (incf indent tab-width))

          (max indent 0)))))))

(defun go-mode-indent-line ()
