]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/chord-name.cc
release: 1.3.93
[lilypond.git] / lily / chord-name.cc
index 3d786acc8182ae746c968ba96db344292d4f8278..80955b20d7404b1063057bbb156dae20f685fd0d 100644 (file)
@@ -152,27 +152,23 @@ MAKE_SCHEME_CALLBACK (Chord_name, brew_molecule);
 SCM
 Chord_name::brew_molecule (SCM smob) 
 {
-  Score_element *sc = unsmob_element (smob);
-  SCM style = sc->get_elt_property ("style");
+  Score_element *me = unsmob_element (smob);
+  SCM style = me->get_elt_property ("style");
 
   if (!gh_string_p (style))
     style = ly_str02scm ("banter");
 
-  SCM inversion = sc-> get_elt_property ("inversion");
+  SCM inversion = me-> get_elt_property ("inversion");
   if (inversion == SCM_EOL)
     inversion = SCM_BOOL_F;
 
-  SCM bass =  sc->get_elt_property ("bass");
+  SCM bass =  me->get_elt_property ("bass");
   if (bass == SCM_EOL)
     bass = SCM_BOOL_F;
 
-  SCM pitches =  sc->get_elt_property ("pitches");
-  SCM text = scm_eval2 (gh_list (ly_symbol2scm ("chord::user-name"),
-                               style,
-                               ly_quote_scm (pitches),
-                               ly_quote_scm (gh_cons (inversion, bass)),
-                               SCM_UNDEFINED),
-                       SCM_EOL);
+  SCM pitches =  me->get_elt_property ("pitches");
+  SCM func = me->get_elt_property (ly_symbol2scm ("chord-name-function"));
+  SCM text = gh_call3 (func, style, ly_quote_scm (pitches), ly_quote_scm (gh_cons (inversion, bass)));
 
-  return ly_text2molecule (sc, text).create_scheme ();
+  return ly_text2molecule (me, text).create_scheme ();
 }