X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fly-syntax-constructors.scm;h=01b054133f47d9dd14f4a0eb7fc177d65ffc9c04;hb=30e40dd034da5d1396d05e09fc4c89f01f959512;hp=4479d01d3191f8c794338be8beb1896f8505a4ba;hpb=def21b306e2b8fa2d5630fab0878e9922e197f0c;p=lilypond.git diff --git a/scm/ly-syntax-constructors.scm b/scm/ly-syntax-constructors.scm index 4479d01d31..01b054133f 100644 --- a/scm/ly-syntax-constructors.scm +++ b/scm/ly-syntax-constructors.scm @@ -1,8 +1,19 @@ -;;;; define-syntax.scm -- Defines functions for syntax expressions +;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; source file of the GNU LilyPond music typesetter -;;;; -;;;; (c) 2006 Erik Sandberg +;;;; Copyright (C) 2006--2009 Erik Sandberg +;;;; +;;;; LilyPond is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. +;;;; +;;;; LilyPond is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with LilyPond. If not, see . ;; TODO: use separate module for syntax ;; constructors. Also create wrapper around the constructor? @@ -97,6 +108,8 @@ (context-spec-music (make-sequential-music (list + (make-property-unset 'tempoUnitDuration) + (make-property-unset 'tempoUnitCount) (make-property-set 'tempoText text))) 'Score)) @@ -129,6 +142,11 @@ 'duration duration 'origin location)) +(define-ly-syntax (repetition-chord parser location previous-chord repetition-function duration articulations) + (let ((new-chord (repetition-function previous-chord duration articulations))) + (set! (ly:music-property new-chord 'origin) location) + new-chord)) + (define-ly-syntax-simple (context-specification type id mus ops create-new) (let* ((type-sym (if (symbol? type) type (string->symbol type))) (csm (context-spec-music mus type-sym id))) @@ -141,7 +159,9 @@ ((PropertySet) (list 'value (car args))) ((PropertyUnset) '()) ((OverrideProperty) (list 'grob-value (car args) - 'grob-property-path (cdr args) + 'grob-property-path (if (list? (cadr args)) + (cadr args) + (cdr args)) 'pop-first #t)) ((RevertProperty) (if (list? (car args))