Use NIL value for unbound variables in compiled templates.
diff --git a/template.lisp b/template.lisp
index c8de3fe..f7865f6 100644
--- a/template.lisp
+++ b/template.lisp
@@ -134,8 +134,11 @@
(defun compile-template (template)
(let ((vars (collect-vars template)))
(compile nil `(lambda ()
- (declare (special ,@vars))
- ,@template))))
+ (symbol-macrolet ,(mapcar (lambda (v)
+ `(,v (when (boundp ',v)
+ (symbol-value ',v))))
+ vars)
+ ,@template)))))
;; File-level cache