- automatic marks.
- */
-
- SCM m = mark_req_l_->get_mus_property ("label");
- if (!gh_string_p (m))
- m = get_property ("rehearsalMark");
-;
-
- if (gh_number_p (m))
- {
- int mark_count = gh_scm2int (m);
- t = to_str (mark_count);
- mark_count ++;
- m = gh_int2scm (mark_count);
- }
- else if (gh_string_p (m))
- {
- t = ly_scm2string (m);
- String next;
- if (t.length_i ())
- {
- char c = t[0];
- c++;
- next = to_str (c);
- }
- m = ly_str02scm (next.ch_C());
- }
+ automatic marks.
+ */
+
+ SCM m = mark_ev_->get_property ("label");
+ SCM proc = get_property ("markFormatter");
+ if (!Text_interface::is_markup (m)
+ && ly_is_procedure (proc))
+ {
+ if (!scm_is_number (m))
+ m = get_property ("rehearsalMark");
+
+ if (scm_is_number (m))
+ {
+ context ()->set_property ("rehearsalMark", scm_oneplus (m));
+ m = scm_call_2 (proc, m, context ()->self_scm ());
+ }
+ else
+ /* FIXME: constant error message. */
+ warning (_ ("rehearsalMark must have integer value"));
+ }
+
+ if (Text_interface::is_markup (m))
+ text_->set_property ("text", m);