]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob-property.cc
Issue 2853: Set up indent-tabs-mode for Emacs in lexer.ll and parser.yy
[lilypond.git] / lily / grob-property.cc
index de1e01b396b4e63dd2f9099c35b52ea318ae7576..3afe182c0ef07793ecf1fd0d09a5ea147c9bd4e1 100644 (file)
@@ -36,8 +36,8 @@ print_property_callback_stack ()
 }
 #endif
 
-static SCM modification_callback = SCM_EOL;
-static SCM cache_callback = SCM_EOL;
+static Protected_scm modification_callback = SCM_EOL;
+static Protected_scm cache_callback = SCM_EOL;
 
 /*
 FIXME: this should use ly:set-option interface instead.
@@ -168,9 +168,9 @@ Grob::internal_get_property (SCM sym) const
 #ifndef NDEBUG
   if (val == ly_symbol2scm ("calculation-in-progress"))
     {
-      programming_error (_f ("cyclic dependency: calculation-in-progress encountered for #'%s (%s)",
-                             ly_symbol2string (sym).c_str (),
-                             name ().c_str ()));
+      programming_error (to_string ("cyclic dependency: calculation-in-progress encountered for #'%s (%s)",
+                                    ly_symbol2string (sym).c_str (),
+                                    name ().c_str ()));
       if (debug_property_callbacks)
         {
           message ("backtrace: ");
@@ -241,17 +241,12 @@ Grob::try_callback_on_alist (SCM *alist, SCM sym, SCM proc)
     grob_property_callback_stack = scm_cdr (grob_property_callback_stack);
 #endif
 
-  /*
-    If the function returns SCM_UNSPECIFIED, we assume the
-    property has been set with an explicit set_property ()
-    call.
-  */
   if (value == SCM_UNSPECIFIED)
     {
       value = get_property_data (sym);
       assert (value == SCM_EOL || value == marker);
       if (value == marker)
-        *alist = scm_assq_remove_x (*alist, marker);
+        *alist = scm_assq_remove_x (*alist, sym);
     }
   else
     {