 (defun first-word ()
   ""
   (let* ((current-line (current-line))
-	 (word-start (string-match "[^ \t]" current-line))
-	 (word-end (string-match "[^a-zA-Z]" current-line word-start)))
+         (word-start (string-match "[^ \t]" current-line))
+         (word-end (string-match "[^a-zA-Z]" current-line word-start)))
     (substring-no-properties current-line word-start word-end)))
 
 (defun classify-indent (line first)


(setq encore-font-lock-keywords
      `(
	(,encore-comment-regexp    . font-lock-comment-face)
	(,encore-keywords-regexp   . font-lock-keyword-face)
	(,encore-danger-regexp     . font-lock-warning-face)
	(,encore-constants-regexp  . font-lock-constant-face)
	(,encore-primitives-regexp . font-lock-type-face)
	(,encore-operators-regexp  . font-lock-builtin-face)
	(,encore-types-regexp      . font-lock-type-face)
	(,encore-function-regexp   2 font-lock-function-name-face)
	(,encore-variable-regexp   1 font-lock-variable-name-face)
	)
      )

(setq encore-tab-width 2)

      0

    (if (equal first "def")
        (if (string-match "\\<def\\>" line)
            (match-beginning 0)
          (if (string-match "\\<passive\\>" line)
              (+ (match-beginning 0) encore-tab-width)
            (if (string-match "\\<class\\>" line)
                (+ (match-beginning 0) encore-tab-width))))

      (if (string-match "\\<passive\\> .*" line)
          (+ (match-beginning 0) encore-tab-width)

        (if (string-match "\\<class\\> .*" line)
            (+ (match-beginning 0) encore-tab-width)

          (if (string-match "\\<if\\>.*\\<then\\>.*\\<else\\>" line)
              (match-beginning 0)
            (if (string-match "\\<if\\>.*\\<then\\>" line)
                (if (equal first "else")
                    (match-beginning 0)
                  (+ (match-beginning 0) encore-tab-width))
              (if (string-match "\\<then\\>" line)
                  (if (equal first "else")
                      (match-beginning 0)
                    (+ (match-beginning 0) encore-tab-width))
                (if (string-match "\\<if\\>.*" line)
                    (if (or (equal first "then") (equal first "else"))
                        (match-beginning 0)
                      (let ((indent (string-match "[^ \t]" line (+ (match-beginning 0) 2)))) (if indent indent (+ (match-beginning 0) encore-tab-width))))
                  (if (string-match "\\<else\\>.*" line)
                      (+ (match-beginning 0) encore-tab-width)

                    (if (string-match "\\<while\\>" line)
                        (+ (match-beginning 0) encore-tab-width)

                      (if (string-match "\\<let\\>.*\\<in\\>$" line)
                          (+ (match-beginning 0) encore-tab-width)

                        (if (string-match "\\<embed\\>.*\\<end\\>" line)
                            (match-beginning 0)
                          (if (string-match "\\<embed\\>" line)
                              (if (equal first "end")
                                  (match-beginning 0)
                                (+ (match-beginning 0) encore-tab-width))

                            (if (string-match "\\<let\\>\\W*\\(\\w+\\)" line)
                                (if (equal "in" first)
                                    (match-beginning 0)
                                  (match-beginning 1))
                              (if (string-match "\\<let\\>" line)
                                  (if (equal "in" first)
                                      (match-beginning 0)
                                    (+ (match-beginning 0) encore-tab-width))
                                (if (string-match "\\<in\\>[ \t]*$" line)
                                    (+ (match-beginning 0) encore-tab-width)

                                  (if (string-match "\\<def\\>" line)
                                      (+ (match-beginning 0) encore-tab-width)

                                    (if (string-match "\\W*\\([^;]*\\);" line)
                                        (match-beginning 1)
                                      (if (bobp)
                                          0))))))))))))))))))))

(setq encore-checked-line nil)
(make-local-variable 'encore-checked-line)
