]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/simple-closure.cc
* ly/engraver-init.ly: Make FiguredBass accepted in GrandStaff and
[lilypond.git] / lily / simple-closure.cc
index 8a32a02871c7c42e84c9c0c617253dac7c8cbc91..db19cfc38c091aff26955e0475d60500c8086898 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
 */
 
@@ -56,11 +56,15 @@ evaluate_with_simple_closure (SCM delayed_argument,
     return expr;
   else if (scm_car (expr) == ly_symbol2scm ("quote"))
     return scm_cadr (expr);
-  else
+  else if (ly_is_procedure (scm_car (expr)))
     {
-      return scm_apply_0 (scm_car (expr), evaluate_args (delayed_argument, scm_cdr (expr)));
+      return scm_apply_0 (scm_car (expr),
+                         evaluate_args (delayed_argument, scm_cdr (expr)));
     }
-
+  else
+    // ugh. deviation from standard. Should print error? 
+    return  evaluate_args (delayed_argument, scm_cdr (expr)); 
+  
   assert (false);
   return SCM_EOL;
 }
@@ -73,7 +77,7 @@ LY_DEFINE(ly_simple_closure_p, "ly:simple-closure?",
 }
 
 LY_DEFINE(ly_make_simple_closure, "ly:make-simple-closure",
-         0, 0, 1, (SCM expr),
+         1, 0, 0, (SCM expr),
          "Make a simple closure. @var{expr} should be form of "
          "@code{(@var{func} @var{a1} @var{A2} ...)}, and will be invoked "
          "as @code{(@var{func} @var{delayed-arg} @var{a1} @var{a2} ... )}.")
@@ -103,4 +107,4 @@ void init_simple_closure ()
 
 
 
-ADD_SCM_INIT_FUNC(simple_closure, init_simple_closure);
+ADD_SCM_INIT_FUNC (simple_closure, init_simple_closure);