[erlang-questions] edoc macro

Richard Carlsson richardc@REDACTED
Thu Aug 16 10:06:16 CEST 2007


Ludovic Coquelle wrote:
> Hi,
> I was trying to implement a "user defined macro" in edoc to 
> automatically generate an html formating of image inclusion (some 'div' 
> tags for alignment, caption etc).
> I successfully defined a static macro with option like {def, [{mymacro, 
> "macro output"}]}. But I didn't succeed in using a function with 
> something like {def,[{dynmacro, fun mymod:myfun/3}]}. I had a quick look 
> at edoc code, and it seems there is a macro checking that ensure the 
> macro body is a string.
> Is there any way to define a macro as a function in the same way it is 
> done internally in edoc?

I think that was my intention, but it is possible that I didn't
check that it actually worked. I'll have a look at it. Thanks for
the report.

> Not related remark: has author's firstname a typo in proplists 
> documentation (or have proplists and edoc been written by different 
> authors)?

Nope, both by me.

     /Richard




More information about the erlang-questions mailing list