guile-user
[Top][All Lists]
Advanced

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

Re: Some issues with guile


From: Nikolaos Chatzikonstantinou
Subject: Re: Some issues with guile
Date: Sun, 28 Apr 2024 01:06:15 -0400

On Sat, Apr 27, 2024 at 1:35 PM Linas Vepstas <linasvepstas@gmail.com> wrote:
> On Sat, Apr 27, 2024 at 2:47 AM Nikolaos Chatzikonstantinou 
> <nchatz314@gmail.com> wrote:
>>
>> On Fri, Apr 26, 2024 at 4:39 PM Tomas Volf <~@wolfsden.cz> wrote:
>> >
>> > What you want is:
>> >
>> >     (set-object-property! foo 'documentation "Contains a @code{'bar}.")
>>
>> Okay, so this can document objects. I propose that a good-enough
>> solution is to document symbols.
>
>
>  (define foo 42)
> (set-object-property! foo 'documentation "my foo thing")
> ,d foo
> my foo thing

You will also get the same response for
    ,d 42
because you've documented the value object and not the symbol object.
The function used by ,d is object-documentation by (ice-9
documentation). When procedures are documented via docstrings, the
documentation is set to the lambda itself (and as far as I can tell,
not via object properties.)

That's why I suggested that for variables, macros, etc, we can
document the symbol. However, I'm realizing there's another issue,
which has to do with module usage, i.e. symbols can be renamed. To
have consistent documentation follow the symbols around correctly, the
use-modules macro needs to be rewritten.

Regards,
Nikolaos Chatzikonstantinou



reply via email to

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