lilypond-devel
[Top][All Lists]
Advanced

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

Re: How do feel people about the following change in syntax?


From: David Kastrup
Subject: Re: How do feel people about the following change in syntax?
Date: Wed, 19 Oct 2011 00:52:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

David Kastrup <address@hidden> writes:

> David Kastrup <address@hidden> writes:
>
>> It might make sense to introduce a syntax change like that in two
>> stages: in the first stage, one just complains about embedded Scheme
>> that could be mistaken for something useful.  Only in the second
>> stage, one does not complain but interprets it accordingly.
>
> Hm.  The bad cases are mostly due to Scheme letting a function like
> hashq-set! or set-object-property! return a value.  How stupid.
>
> A first measure had been the creation of
> (define-macro (define-void-function . rest)
>               `(define-scheme-function ,@rest (begin)))
> and using that instead of define-scheme-function in
> music-functions-init.ly (up to now, Scheme functions are used there only
> for effect rather than value).
>
> There are still things like #(set-object-property! ...) in the source.
> Redefining all those would likely be a bit overkill, so basically it
> will be advisable to use something like
> \ignore #(set-object-property! ...
> or
> \void #(set-object-property! ...
> to silence the more obstinate Scheme expressions.

On the plus side, I get, say,
cue-clef-after-barline.ly:28:38: error: ignoring specific Scheme value
  \revert Score.BarLine #'space-alist 
                                      #'cue-clef 
I
which clearly points out a programming error.

-- 
David Kastrup




reply via email to

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