[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Introducing the LIlypond Snippet Repository
From: |
Nicolas Sceaux |
Subject: |
Re: Introducing the LIlypond Snippet Repository |
Date: |
Tue, 01 Feb 2005 22:23:13 +0100 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) |
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)))
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.
I'll do that.
nicolas
- Re: Introducing the LIlypond Snippet Repository,
Nicolas Sceaux <=