Many macros that take a "body" argument expand into a call to an advertised function that takes a functional argument. This functional argument will execute the supplied body. For a macro named with-environment, the function is generally named do-with-environment. For example, with-drawing-options might be defined as follows:
define macro with-drawing-options
{ with-drawing-options
(?medium:name, #rest ?keys:*) ?body:body end }
=> { begin
let with-drawing-options-body =
method (?medium) ?body end;
do-with-drawing-options(?medium,
with-drawing-options-body, ?keys)
end }
end macro;
define method do-with-drawing-options
(medium :: <medium>, function, #rest options)
apply(merge-drawing-options-into-medium, medium, options);
function(medium)
end;