]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob-closure.cc
Merge branch 'master' into dev/texi2html
[lilypond.git] / lily / grob-closure.cc
index 9dddc0616f85a11241992a4e39d1a4967253e910..124d1437932c034f7fa5e2ba1dd5195585dac6ad 100644 (file)
@@ -67,21 +67,32 @@ add_offset_callback (Grob *g, SCM proc, Axis a)
 
 */
 void
-chain_offset_callback (Grob *g, SCM proc, Axis a)
+chain_callback (Grob *g, SCM proc, SCM sym)
 {
-  SCM data = g->get_property_data (axis_offset_symbol (a));
+  SCM data = g->get_property_data (sym);
 
   if (ly_is_procedure (data))
     data = ly_make_simple_closure (scm_list_1  (data));
   else if (is_simple_closure (data))
     data = simple_closure_expression (data);
-  else if (!scm_is_number (data))
-    data = scm_from_int (0);
-  
+  else
+    /*
+      Data may be nonnumber. In that case, it is assumed to be
+      undefined.
+    */
+
+    data = SCM_UNDEFINED;
+
   SCM expr = scm_list_2 (proc, data);
-  g->set_property (axis_offset_symbol (a),
+  g->set_property (sym,
                   
                   // twice: one as a wrapper for grob property routines,
                   // once for the actual delayed binding. 
                   ly_make_simple_closure (ly_make_simple_closure (expr)));
 }
+
+void
+chain_offset_callback (Grob *g, SCM proc, Axis a)
+{
+  chain_callback (g, proc, axis_offset_symbol (a));
+}