]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tweak-registration.cc
* lily/stencil-scheme.cc (LY_DEFINE): ly:stencil-in-color
[lilypond.git] / lily / tweak-registration.cc
index fe815e19c85e86fa927cd1db328b7a1ff5a1f5b2..9604c5f202bde81dd60e7e7a6a7917e3f4d301fa 100644 (file)
@@ -42,10 +42,13 @@ Tweak_registry::insert_tweak_from_file (SCM tweak)
          && scm_car (skey) == ly_symbol2scm ("key"));
 
   Object_key const *key = undumper_->get_key (scm_to_int (scm_cadr (skey)));
-  if (tweaks_.find (key) == tweaks_.end ())
-    tweaks_[key] = SCM_EOL;
 
-  tweaks_[key] = scm_cons (scm_cdr (tweak), tweaks_[key]);
+  SCM existing = SCM_EOL;
+  Tweak_map::const_iterator prev = tweaks_.find (key);
+  if (prev != tweaks_.end ())
+    existing = (*prev).second;
+
+  tweaks_[key] = scm_cons (scm_cdr (tweak), existing);
 }
 
 void