lilypond-devel
[Top][All Lists]
Advanced

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

Re: Introducing the LIlypond Snippet Repository


From: Han-Wen Nienhuys
Subject: Re: Introducing the LIlypond Snippet Repository
Date: Tue, 1 Feb 2005 23:05:26 +0100

address@hidden writes:
> Han-Wen Nienhuys <address@hidden> writes:
> >
> > This should not be a big problem. In this case, I solved it by adding
> > begin-of-line-invisible to safe-lily.scm. However, we should probably
> > have some Scheme level macro support for tagging a definition as
> > "safe", ie.
> >
> >  (define-safe-public (begin-of-line-invisible .. ))
> 
> Something like that could do it:
> 
> (define-macro (define-safe-public arglist . body)
>   (let ((safe-symbol (if (symbol? arglist)
>                          arglist
>                          (car arglist))))
>     `(begin
>        (define*-public ,arglist
>          ,@body)
>        (set! safe-objects (cons (cons ',safe-symbol ,safe-symbol)
>                                 safe-objects))
>        ,safe-symbol)))

Could you add this? 

> It would be good also that LY_DEFINE declared as safe the functions
> that it defines, e.g. by invoking declare-safe afterwards:
> 
> (define (declare-safe symbol)
>   (set! safe-objects (cons (cons symbol (primitive-eval symbol))
>                            safe-objects))
>   symbol)
> 
> Unless some LY_DEFINEd functions are not safe, in which case
> LY_DEFINE_SAFE should be added.

Good point. We'll add that to the TODO list.


-- 

 Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen 





reply via email to

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