+
+void
+Score::set_music (SCM music, SCM parser)
+{
+ /* URG? */
+ SCM check_funcs = ly_scheme_function ("toplevel-music-functions");
+ for (; scm_is_pair (check_funcs); check_funcs = scm_cdr (check_funcs))
+ music = scm_call_2 (scm_car (check_funcs), music, parser);
+
+ if (unsmob_music (music_))
+ {
+ unsmob_music (music)->origin ()->error (_("Already have music in score"));
+ unsmob_music (music_)->origin ()->error (_("This is the previous music"));
+ }
+ Music * m = unsmob_music (music);
+ if (m && to_boolean (m->get_property ("error-found")))
+ {
+ m->origin()->error (_("Error found in this music expression. Ignoring it"));
+
+ this->error_found_ = this->error_found_ || to_boolean (m->get_property ("error-found"));
+
+ }
+
+ if (this->error_found_)
+ this->music_ = SCM_EOL;
+ else
+ this->music_ = music;
+
+}
+
+SCM
+Score::get_music () const
+{
+ return music_;
+}