               (setq indentation (+ indentation ks-indent))
               (setq significant-earlier-line t)))
         (if (looking-at statement-end)
-            (progn
-              (setq significant-earlier-line t)))
-        (if (looking-at nothing-special)
             (setq significant-earlier-line t))
         (if (bobp)
             (progn

    (indent-line-to indent)))

(defun ks-previous-indentation ()
  "Get the indentation of the previous non-blank line of Kerboscript."
  (save-excursion
    (forward-line -1)
    (while (looking-at "[[:space:]]*$")
      (forward-line -1))
    (current-indentation)))


  (let ((indentation (ks-previous-indentation))
        (significant-earlier-line nil)
        (opening-brace ".*{[[:space:]]*\\(//.*\\)?$")
        (closing-brace ".*}")
        (statement-end ".*\\.[[:space:]]*\\(//.*\\)?$")
        (blank-line "[[:space:]]*$"))
    (save-excursion
      (beginning-of-line)
