     (beginning-of-line)
     (looking-at *closure-close*)))
 
+(defvar *closure-template-indent-keywords*
+  (list *closure-template-template-keywords*
+        *closure-template-foreach-keywords*
+        *closure-template-if-switch-keywords*
+        *closure-template-literal-keywords*
+        *closure-template-let-keywords*))
+
 (defun closure-tag-closed ()
   (save-excursion
     (beginning-of-line)
     (if (looking-at *closure-tag-closed*)
         (let ((str (match-string 1)))
-          (or (some (lambda (obj)
-                      (string-match (caar obj)
-                                    str))
-                    (list *closure-template-template-keywords*
-                          *closure-template-foreach-keywords*
-                          *closure-template-if-switch-keywords*
-                          *closure-template-literal-keywords*
-                          *closure-template-let-keywords*))
-              (some (lambda (obj)
-                      (string-match (caadr obj)
-                                    str))
-                    (list *closure-template-template-keywords*
-                          *closure-template-foreach-keywords*
-                          *closure-template-if-switch-keywords*
-                          *closure-template-literal-keywords*
-                          *closure-template-let-keywords*)))))))
+          (some (lambda (obj)
+                  (or (and (caar obj) (string-match (caar obj) str))
+                      (and (caadr obj) (string-match (caadr obj) str))))
+                *closure-template-indent-keywords*)))))
 
 (defun closure-tag-opened ()
   (save-excursion
     (beginning-of-line)
     (if (looking-at *closure-tag-opened*)
         (let ((str (match-string 1)))
-          (some (lambda (obj)
-                  (string-match (caar obj)
-                                str))
-                (list *closure-template-template-keywords*
-                      *closure-template-foreach-keywords*
-                      *closure-template-if-switch-keywords*
-                      *closure-template-literal-keywords*
-                      *closure-template-let-keywords*))))))
+          (some (lambda (obj) (string-match (caar obj) str))
+                *closure-template-indent-keywords*)))))
 
 (defun closure-previous-indent ()
   (save-excursion

      (otherwise (indent-line-to (- (second prev) sgml-basic-offset))))))

(defun closure-indent-line ()
  (interactive)
  (cond
   ((closure-close) (indent-closure-close))
   ((closure-open) (indent-closure-open))


(defvar *closure-template-let-keywords*
  `((,(rx "{"
          (group (or "let"))
          (1+ space)
          (1+ (not (any "}")))
          (0+ space)
          "}")
     (1 closure-template-tag-face))
    (,(rx "{" (group (or "/let")) "}")
     (1 closure-template-tag-face))))

(defun closure-template-html-font-lock-keywords-3 ()
