[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error in tweak parameter doesn't generate error message
From: |
Neil Puttock |
Subject: |
Re: Error in tweak parameter doesn't generate error message |
Date: |
Sat, 25 Apr 2009 15:48:15 +0100 |
2009/4/23 Nick Payne <address@hidden>:
> I was trying to move a TextSpanner with \tweak and couldn't figure out why
> it wouldn't move. I eventually noticed that I had accidentally typed
>
> -\tweak #'extra-ofset
>
> instead of
>
> -\tweak #'extra-offset
>
> but this did not generate any warning. Looks like this is a general thing
> with \tweak, as I tried changing \tweak #'color to \tweak #'colon and got no
> warning there either.
There may be a good reason why there's no type-checking for \tweak,
but you can redefine it if you like:
tweak =
#(define-music-function (parser location sym val arg)
(symbol? scheme? ly:music?)
(_i "Add @code{sym . val} to the @code{tweaks} property of @var{arg}.")
(if (equal? (object-property sym 'backend-type?) #f)
(ly:warning "cannot find property type-check for: ~a" sym)
(set!
(ly:music-property arg 'tweaks)
(acons sym val
(ly:music-property arg 'tweaks))))
arg)
Regards,
Neil