     (if (bobp)
         0
       (forward-line -1)
-      (if (= ?\n (following-char))
+      (if (current-line-is-empty)
           (find-indentation-level-based-on-previous-indentation)
         (let ((stripped-line
                (replace-regexp-in-string " *;;.*" "" (thing-at-point 'line t))))

  (save-excursion
    (beginning-of-line)
    (if (> n 0)
        (dotimes (x n nil) (insert-char ? ))
      (delete-forward-char (- n)))))

(defun current-indentation ()

                   (equal "{" (last-char-before-newline stripped-line)))
              (+ 2 (current-indentation))
            (current-indentation)))))))

(defun current-line-is-empty ()
  (string-match "^ *\n$" (thing-at-point 'line t)))

(defun stic-mode ()
  "Major mode for editing stic input files"
