From: Andy Wingo <wingo@pobox.com>
Cc: Guile Users <guile-user@gnu.org>
Subject: Re: macro documentation? (was: Re: Req for help on objects and environments)
Date: Tue, 07 Sep 2004 20:40:23 +0200 [thread overview]
Message-ID: <1094582424.3785.301.camel@lark> (raw)
In-Reply-To: <FC6261FD-0054-11D9-92BF-000A95CD5044@mac.com>
Hey Richard,
On Mon, 2004-09-06 at 17:34 -0500, Richard Todd wrote:
> On Sep 3, 2004, at 2:10 PM, Andy Wingo wrote:
> >
> > On Thu, 2004-09-02 at 13:53 +0200, tomas@fabula.de wrote:
> >> (Note as well that the properties get attached to the *value*, not to
> >> the
> >> *variable*):
>
> A similar problem appears when trying to document syncase macros...
> they all (display) as:
>
> #<macro! sc-macro>
>
> When I apply the 'documentation property to one of these macros, all
> the sudden ALL my syncase macros have this documentation.
That's what you get for using syncase ;-)
Seriously though, this is a problem. Perhaps we can make define-with-
docs set the object-property on the _variable_ rather than (in addition
to?) the value:
(define-macro-with-docs (define-with-docs sym docs val)
"Define a variable with documentation."
`(begin
(define ,sym ,val)
(set-object-property! (module-variable ,sym) 'documentation ,docs)
*unspecified*))
Of course with the proper checks, etc. Then when we implement Marius's
Grand New Help Scheme (GNHS), we can make `help' look for documentation
on the variable first. In any case, we implement it in (texinfo
reflection).
> How does this sc-macro entity know which transformation to make?
Presumably because it is passed the whole expression, including the name
of the macro, which would then be looked up in the lexical environment
or in the global macro-table.
Regards,
--
Andy Wingo <wingo@pobox.com>
http://ambient.2y.net/wingo/
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2004-09-07 18:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-02 11:09 [Fwd: Req for help on objects and environments] Alp Öztarhan
2004-09-02 11:53 ` tomas
2004-09-02 12:47 ` Alp Öztarhan
2004-09-02 19:19 ` Stephen Compall
2004-09-03 19:10 ` Req for help on objects and environments Andy Wingo
2004-09-06 22:34 ` macro documentation? (was: Re: Req for help on objects and environments) Richard Todd
2004-09-07 18:40 ` Andy Wingo [this message]
2004-09-03 20:27 ` [Fwd: Req for help on objects and environments] Ludovic Courtès
2004-09-04 11:31 ` Marius Vollmer
2004-09-04 13:07 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1094582424.3785.301.camel@lark \
--to=wingo@pobox.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).