Hi Anders,

On Thu, Mar 5, 2015 at 2:47 AM, <anders.vin...@bek.no> wrote:

[...]

If you've got access to the actual scheme-code where the definitions
> takes place it should be possible to use rewrite macros.
>
> Something along the lines below would give you a table (an ordinary list
> here) 'procargstable keeping the procedure-name and the verbatim
> argument-list:
>
> [...]


>
> I'd actually be a bit surprised if LilyPond didn't use specialised
> macros for defining its functions already, meaning you could just
> specialize these a bit further...
>
> Where do we find the definitions in LY?


Thanks!  This is very helpful information.

What you are suggesting seems to be analogous to what is already done for
the functions on the Scheme functions documentation page I referenced
earlier.
These are all created with a macro LY_DEFINE, which both makes these C++
functions accessible from Scheme and adds to a hash table from which the
documentation is created.

As Paul points out, the Scheme procedures I'm wanting to document are
created simply with define-public.

So, as I understand it, I would create a macro which would both define and
export the function (define-public) and add its name and arguments to some
sort of table.  This would have the benefit of allowing us to be selective
about what is documented.

--David
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to