         (if (looking-at-p "[[{]") (setq indent (+ indent tab-width))
           ;; un-indent if we close with ] or }
           (if (looking-at-p "[]}]") (setq indent (- indent tab-width))))
-        (forward-char 1))
+        (forward-char))
       ;; un-indent if next line starts with a closing ] or }
       (if (looking-at-p "\n[ \t]*[]}]") (setq indent (- indent tab-width)))
 

    (if (and
         (zotonic-tpl-prev-tag-boundary (point-min))
         (looking-at-p "{"))
        (progn
          (goto-char start)
          (zotonic-tpl-indent-tag-line))
      (goto-char start)
      (indent-relative))))

(define-derived-mode zotonic-tpl-mode prog-mode "Zotonic"
  "Major mode for editing Zotonic templates."

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