Name: DEFWEAKMACRO
Section:
Macro Commands
Synopsis:
<defweakmacro MACRO-NAME>
%body
</defweakmacro>
Description:
defweakmacro
is exactly like defmacro
, with one exception: at invocation time, the closing tag does not have to be present -- in that case, the invocation is treated as if the definition were a defsubst
.
This facility exists primarily to allow the redefinition of standard HTML constructs which allow the closing tag to be missing, and yet, still inexplicably operate correctly.
For example, the <p>
tag is often used without its closing counterpart of </p>
. If you wished to redefine <p>
to do something special when a closing tag was found, you might write the following definition:
<defweakmacro p>
<verbatim><P></verbatim>
<when %qbody> Look ma! %body See? </when>
<verbatim></P></verbatim>
</defweakmacro>
then, a simple <P>
would produce
<P></P>
, while a complex invocation, such as:
<P> this is a list </P>
produces
<P> Look ma! this is a list See? </P>
Edit Pointer
Function Index
Variable Index
Variable Editor

The
META-HTML
Reference Manual V1.4
Copyright © 1995, 1996,
Brian J. Fox,
1996, 1997 Universal Access Inc.
Found a bug? Send mail to
bug-manual@metahtml.com