 
 (defun indent-sgml-in-closure ()
   (let ((prev (closure-previous-indent)))
+    (message "%s" prev)
     (case (first prev)
-      (opened (indent-line-to (+ (second prev)
-                                 sgml-basic-offset)))
+      ((opened composite)
+       (indent-line-to (+ (second prev)
+                          sgml-basic-offset)))
       (otherwise
        (let* ((savep (point))
               (indent-col (save-excursion
-                                 (back-to-indentation)
-                                 (if (>= (point) savep) (setq savep nil))
-                                 (sgml-calculate-indent))))
+                            (back-to-indentation)
+                            (if (>= (point) savep) (setq savep nil))
+                            (sgml-calculate-indent))))
          (cond
           ((eql (first prev) 'closed)
            (setf indent-col

  (save-excursion
    (while (and (zerop (forward-line -1))
                (or (looking-at "[ \t]*$")
                    (closure-any-com))))
    (back-to-indentation)
    (list (cond
           ((closure-tag-closed) 'closed)
           ((closure-tag-opened) 'opened)
           (t nil))


(defvar *closure-template-foreach-keywords*
  `((,(rx "{"
          (group (or "foreach" "ifempty"))
          (1+ space)
          (1+ (not space))
          (1+ space)
