Hi Linas, El 27/04/24 a las 17:35, Linas Vepstas escribió:
On Sat, Apr 27, 2024 at 2:47 AM Nikolaos Chatzikonstantinou < nchatz...@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") ,a foo (guile-user): foo ,d foo my foo thing (define (bar) (list 'a)) (set-object-property! bar 'documentation "this bar does stuff") ,a bar (guile-user): bar #<procedure bar ()> (guile): module-obarray-ref #<procedure module-obarray-ref (ob key)> ... ,d bar this bar does stuff where ,a is short for ,apropos and ,d is short for ,describe
If I understand correctly, though, the "set-object-property!" procedure is part of a legacy interface. The manual recommends using object properties as shown in the Object Properties section instead (https://www.gnu.org/software/guile/manual/html_node/Object-Properties.html).
OpenPGP_0x0AB0D067012F08C3.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature