        (t
         ;; Neither top-level nor in a multi-line string or comment
         (let ((indent 0)
-              (inside-indenting-paren nil))
+              (inside-indenting-paren nil)
+              (current-line-closes-scope 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))))

          ;; case, default, and labels are outdented 1 level
          (when (looking-at "\\<case\\>\\|\\<default\\>\\|\\w+\\s *:\\(\\S.\\|$\\)")
            (decf indent tab-width))

          ;; Continuation lines are indented 1 level
          (forward-comment (- (buffer-size)))

                     (and depth
                          (not (eq (char-after (caar depth)) ?\{)))))
                  (t
                   ;; Except when the current line closes the previous line's 
                   ;; scope, anything else is a continuation line.
                   (not current-line-closes-scope)))
            (incf indent tab-width))
          (max indent 0)))))))

