- A Lisp form in place of "plane attribute" is allowed. Forms are read by the standard read function. All starting tags (except
TMPL_INCLUDE) accept forms instead of "old style" attributes.
*attributes-are-lisp-forms* special variable was introduced.
Bind or set it to NIL to treating those tags in the compatibility mode.
template-evalwas introduced. It is a simple evaluator akin to the standard
evalfunction except for:
- A limited number of special-forms is supported, namely:
IF WHEN UNLESS AND OR NOT QUOTE.
TMPL_EVALtag and create-eval-printer were introduced; the former should be used instead of the
*format-non-strings*has got an additional meaning. If it equals to
T, the result is produced by means of
(format nil "~A" ...).
If it is true but not equals to T, the value must be a single-parameter function, which returns two values:
(1) a string resulted from its argument, and optionally
(2) do-not-modify flag controlling whether
*string-modifier*is applied afterwards.
The truth as second value can prevent the result of converting from predefined format, e.g. LHTML, from further escaping.
TMPL_ELSEand all ending tags
/TMPL_...can embed an optional text between the tag name and the closing marker "-->". This text is intended for readability only and completely ignored by the template parser. For example:
<!-- /TMPL_LOOP rows -->
TMPL_ELIFtag was introduced to allow a more concise code. In full, now the "if" pattern looks like:
!-- TMPL_IF condition_1 -- text_1 !-- TMPL_ELIF condition_2 -- text_2 ... !-- TMPL_ELSE -- text_else !-- /TMPL_IF --