"Geoff Horton" <[EMAIL PROTECTED]> writes:

> Mats Bengtsson <[EMAIL PROTECTED]> writes:

>> As far as I understand, it should be trivial to make a
>> version of define-music-function where the user doesn't have to add
>> these arguments manually, so the syntax is
>>
>> #(new-define-music-function (arg1 arg2 ... ) (typecheck1 typecheck2 ... )
>>   #{    ordinary LilyPond code using $arg1 $arg2 ...  #}
>> }

This is manageable indeed :-)

> I think that would satisfy most of my needs.

???

#(new-define-music-function (arg1 arg2 ... )
                            (typecheck1 typecheck2 ... )
   #{    ordinary LilyPond code using $arg1 $arg2 ...  #})

satisfies your needs but:

#(define-music-function (parser location arg1 arg2 ... )
                        (typecheck1 typecheck2 ... )
   #{    ordinary LilyPond code using $arg1 $arg2 ...  #})

does not? 

Ok so the real problem is the two extra parameters...

#(defmacro-public def-mus-fn ;; short name for short version :)
                 (args typechecks . body)
  (let ((parser (gensym))
        (location (gensym)))
    `(define-music-function (,parser ,location ,@args) ,typechecks
       ,@body)))


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to