Issue 3625: Overrides via \tweak don't insist on proper context/grob and property...
authorDavid Kastrup <dak@gnu.org>
Sun, 20 Oct 2013 13:29:21 +0000 (15:29 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 25 Oct 2013 06:00:40 +0000 (08:00 +0200)
The normal \tweak syntax of overrides is
\tweak property #value Context.Grob

This version just concatenates the symbol list at the end with the one
at the start before checking for a valid (possibly sub-)property path.
This allows a somewhat more flexible programmatic use.

ly/music-functions-init.ly

index 02c6ac6531a01775563d6afe61bd37827fb65066..dbecbf2f4413cbb8b191fd617b095dea11366876 100644 (file)
@@ -1485,12 +1485,12 @@ property (inside of an alist) is tweaked.")
        ;; We could just throw this at \override and let it sort this
        ;; out on its own, but this way we should get better error
        ;; diagnostics.
-       (let ((a (check-grob-path item parser location
-                                 #:default 'Bottom #:min 2 #:max 2))
-             (b (check-grob-path prop parser location
-                                 #:start 2)))
-         (if (and a b)
-             #{ \override #(append a b) = #value #}
+       (let ((p (check-grob-path
+                 (append item (if (symbol? prop) (list prop) prop))
+                 parser location
+                 #:default 'Bottom #:min 3)))
+         (if p
+             #{ \override #p = #value #}
              (make-music 'Music)))))
 
 undo =