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.
;; 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 =