guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SLAYER announcement and help request for preparing a GNU package


From: Panicz Maciej Godek
Subject: Re: SLAYER announcement and help request for preparing a GNU package
Date: Wed, 8 May 2013 23:44:17 +0200

2013/5/8 Mike Gran <address@hidden>

> No, it's not used to generate the manual.  It's used to generate
> guile-procedures.txt, which is consulted by 'object-documentation'.
>
> I agree that the current state of docstring handling leaves much to be
> desired.  Maybe we should start a discussion on guile-devel about how
> the improve things.

I once asked the question if it would be possible to create a version
of scm_c_define_gsubr that took a docstring.  The opinion at the time
was that it would be difficult.

Well, after a moment of thought I concluded that it's not that difficult, at least with the current version of guile, using scm_set_procedure_property_x:

scm_c_define_gsubr("proc", 0, 0, 0 ,(scm_t_subr) proc);
scm_c_export("proc" ,NULL);

scm_set_procedure_property_x(scm_variable_ref(scm_c_lookup("proc")),
                                             scm_from_utf8_symbol("documentation"),
                                             scm_from_utf8_string("Does something"));

Although it may not be particularly efficient, I think it is sufficient (and it seems to work just fine), unless there are any other contraindications


reply via email to

[Prev in Thread] Current Thread [Next in Thread]