 
 ;; This header is following the guidelines presented in
 ;; http://www.gnu.org/software/emacs/manual/html_node/elisp/Library-Headers.html#Library-Headers
+
+;;; Multiline font-lock:
+
+;; Support for multiline font-lock has been achieved by setting
+;; font-lock-multiline to `t', plus some neat trickery in the keywords
+;; table. The trick is to match the anchor to entire tags, that may be
+;; spanning multiple lines. Then each anchored sub highlighter will have
+;; to move point back in the `pre-form', yet still return the `end-of-tag'
+;; that was matched in order to mark it too as a multiline construct.
+;; This is all the goto-char match-end you'll see in the matchers.
+
+;;; Tag soup support:
+
+;; Tag soup, a.k.a html, is supported directly in this mode. It ought to
+;; be supported by an accompanying sub-mode. But I can't be bothered with it.
 
 ;;; Code:
 

  "Calculate the indentation to use for the line following the line
 offset lines from the current line."
  (save-excursion
    (forward-line offset)
    (skip-chars-forward " \t")
    (let ((indent (current-column)))
      (skip-chars-forward "]}")
      (while (not (eolp))

  (save-excursion
    (beginning-of-line)
    (if (looking-at-p "[ \t]*[%}]}")
        ;; indent closing tag
        (indent-line-to (save-excursion
                          (zotonic-tpl-prev-tag-boundary (point-min))
                          (current-column)))
      ;; indent line inside tag
      (indent-line-to (zotonic-tpl-get-indent-for-line -1))
      )))

