[Top][All Lists]

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

Re: macro documentation? (was: Re: Req for help on objects and environme

From: Andy Wingo
Subject: Re: macro documentation? (was: Re: Req for help on objects and environments)
Date: Tue, 07 Sep 2004 20:40:23 +0200

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, address@hidden 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."
     (define ,sym ,val)
     (set-object-property! (module-variable ,sym) 'documentation ,docs)

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

> 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.

Andy Wingo <address@hidden>

reply via email to

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