From db065d490d62852eb1d3aaa9339863b181071152 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 24 Sep 2002 14:25:08 +0000 Subject: [PATCH] (music-separator?): don't use name music property. --- ChangeLog | 5 +++++ lily/music.cc | 2 ++ lily/new-accidental-engraver.cc | 1 + scm/drums.scm | 4 ++-- scm/music-functions.scm | 6 +++--- scm/music-types.scm | 2 ++ scm/ps.scm | 4 +++- 7 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index d19e11bb75..a00be13144 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-09-24 Han-Wen Nienhuys + + * scm/music-functions.scm (music-separator?): don't use name music + property. + 2002-09-24 Jan Nieuwenhuizen * lily/new-accidental-engraver.cc: Compile fix. diff --git a/lily/music.cc b/lily/music.cc index d2c0105d80..d87be5881e 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -285,6 +285,8 @@ future. Music is the data type that music expressions are stored in. The data type does not yet offer many manipulations. + +WARNING: deprecated; use make-music-by-name. ") { SCM_ASSERT_TYPE(gh_string_p (type), type, SCM_ARG1, __FUNCTION__, "string"); diff --git a/lily/new-accidental-engraver.cc b/lily/new-accidental-engraver.cc index 6604b3cbb9..0bc51dff5c 100644 --- a/lily/new-accidental-engraver.cc +++ b/lily/new-accidental-engraver.cc @@ -6,6 +6,7 @@ This is an experimental file - producing correct accidentals but unfortunately ruining the spacing. -rz + */ #include "musical-request.hh" diff --git a/scm/drums.scm b/scm/drums.scm index b2c5d24d55..5ba3310780 100644 --- a/scm/drums.scm +++ b/scm/drums.scm @@ -165,7 +165,7 @@ ;; (define (make-articulation-script x) - (let* ((m (make-music-by-name "Articulation_req"))) + (let* ((m (make-music-by-name 'ArticulationEvent))) (ly-set-mus-property! m 'articulation-type x) m)) @@ -188,7 +188,7 @@ ) (define (make-head-type-elem t) - (let* ( (m (make-music-by-name "Music"))) + (let* ( (m (make-music-by-name 'Music))) (set-mus-properties! m `((iterator-ctor . ,Push_property_iterator::constructor) diff --git a/scm/music-functions.scm b/scm/music-functions.scm index eff861cf86..8c0476ce1d 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -236,8 +236,8 @@ this is not an override (define-public (music-separator? m) "Is M a separator." - (let* ((n (ly-get-mus-property m 'name ))) - (and (symbol? n) (equal? 'separator n)) + (let* ((ts (ly-get-mus-property m 'types ))) + (memq 'separator ts) )) (define (split-one sep? l acc) @@ -324,7 +324,7 @@ this is not an override )) (define-public (empty-music) - (ly-id (make-music-by-name "Music")) + (ly-id (make-music-by-name 'Music)) ) ;;; diff --git a/scm/music-types.scm b/scm/music-types.scm index b127293ce3..65fd166dae 100644 --- a/scm/music-types.scm +++ b/scm/music-types.scm @@ -294,6 +294,8 @@ music-descriptions) (define-public (make-music-by-name x) + (if (not (symbol? x)) + (misc-error "Not a symbol: ~s" x)) (let* ( (props (hashq-ref music-name-to-property-table x '())) diff --git a/scm/ps.scm b/scm/ps.scm index 2c99fe5d24..611c3244e7 100644 --- a/scm/ps.scm +++ b/scm/ps.scm @@ -7,7 +7,9 @@ -(define-module (scm ps) +(define-module + (scm ps) + ) (define font-name-alist '()) -- 2.39.5