rewrite webmacro mode by deriving from fundamental mode