]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/translator-scheme.cc (ly:translator-property): Remove.
authorjanneke <janneke>
Thu, 21 Apr 2005 18:45:04 +0000 (18:45 +0000)
committerjanneke <janneke>
Thu, 21 Apr 2005 18:45:04 +0000 (18:45 +0000)
Update callers.

* lily/context-scheme.cc (ly:context-now): Move from translator.
Update callers.

ChangeLog
lily/auto-beam-engraver.cc
lily/context-scheme.cc
lily/grid-line-interface.cc
lily/translator-scheme.cc
scm/auto-beam.scm

index 82043c74217987451762444b925aae1974635fbb..97b062e0b091e2f42ec02f1fa54fe32adc2541c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-04-21  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * lily/translator-scheme.cc (ly:translator-property): Remove.
+       Update callers.
+
+       * lily/context-scheme.cc (ly:context-now): Move from translator.
+       Update callers.
+
 2005-04-21  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * input/regression/grid-lines.ly (skips): refine example.
@@ -7,7 +15,7 @@
 
        * input/regression/grid-lines.ly (Module): new file.
 
-       * lily/grid-point-engraver.cc (Module): new file
+       * lily/grid-point-engraver.cc (Module): new file.
 
        * lily/grid-line.cc (Module): new file.
 
index 1a79419ad9eb35ffae1133e8194b21b6c0982f48..38585b06d5960f73d321f40f183e94e1e0a17dc9 100644 (file)
@@ -112,7 +112,7 @@ bool
 Auto_beam_engraver::test_moment (Direction dir, Moment test)
 {
   return scm_call_3 (get_property ("autoBeamCheck"),
-                    self_scm (),
+                    context ()->self_scm (),
                     scm_from_int (dir),
                     test.smobbed_copy ())
     != SCM_BOOL_F;
index 3ea9718f53769f18467a18e5a18a4a4028aa592e..6ebb4fcac0639b014c6e0d8d595a8098d171186b 100644 (file)
@@ -150,3 +150,11 @@ LY_DEFINE (ly_context_find, "ly:context-find",
   return SCM_BOOL_F;
 }
 
+LY_DEFINE (ly_context_now, "ly:context-now",
+          1, 0, 0, (SCM context),
+          "Return now-moment of context CONTEXT")
+{
+  Context *ctx = unsmob_context (context);
+  SCM_ASSERT_TYPE (ctx, context, SCM_ARG1, __FUNCTION__, "Context");
+  return ctx->now_mom ().smobbed_copy ();
+}
index c721190e0e94881abfcafcc17106cb09aa16ce7d..953fe4ab7e302a619deadceba11ac764e011683d 100644 (file)
@@ -7,12 +7,13 @@
 
 */
 
+#include "grid-line-interface.hh"
+
+#include "grob.hh"
 #include "group-interface.hh"
+#include "lookup.hh"
 #include "output-def.hh"
 #include "stencil.hh"
-#include "lookup.hh"
-#include "grid-line-interface.hh"
-#include "grob.hh"
 
 
 MAKE_SCHEME_CALLBACK (Grid_line_interface, print, 1);
@@ -81,4 +82,3 @@ ADD_INTERFACE (Grid_line_interface, "grid-line-interface",
 ADD_INTERFACE (Grid_point_interface, "grid-point-interface",
               "A spanning point for grid lines. ",
               "");
-
index fa4774bc6a5636035c4d08903db6cc96eab0b640..6efd36b591955244c208bbfe6191775468a49034 100644 (file)
@@ -21,15 +21,6 @@ LY_DEFINE (ly_translator_name, "ly:translator-name",
   return ly_symbol2scm (nm);
 }
 
-LY_DEFINE (ly_translator_now, "ly:translator-now",
-          1, 0, 0, (SCM trans),
-          "Return now-moment of translater TRANS")
-{
-  Translator *tr = unsmob_translator (trans);
-  SCM_ASSERT_TYPE (tr, trans, SCM_ARG1, __FUNCTION__, "Translator");
-  return tr->now_mom ().smobbed_copy ();
-}
-
 LY_DEFINE (ly_translator_description, "ly:translator-description",
           1, 0, 0, (SCM me),
           "Return an alist of properties of  translator @var{me}.")
@@ -39,20 +30,6 @@ LY_DEFINE (ly_translator_description, "ly:translator-description",
   return tr->translator_description ();
 }
 
-LY_DEFINE (ly_translator_property, "ly:translator-property",
-          2, 0, 0, (SCM translator, SCM sym),
-          "Return the value of a value in translator @var{g} of property @var{sym}. "
-          "It will return @code{' ()} (end-of-list) "
-          "if  @var{sym} is undefined in @var{g}."
-          "\n\n")
-{
-  Translator *sc = unsmob_translator (translator);
-  SCM_ASSERT_TYPE (sc, translator, SCM_ARG1, __FUNCTION__, "translator");
-  SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
-
-  return sc->internal_get_property (sym);
-}
-
 int
 Translator::print_smob (SCM s, SCM port, scm_print_state *)
 {
index 806287d1717e45c4a0a56c1794a5e0b878cae5c9..e3369a4346c32a0dd81f10925001c92f813c611e 100644 (file)
@@ -185,12 +185,12 @@ a fresh copy of the list-head is made."
 ;;  4. exceptions for specific time signature
 ;;  5. easy catch-all rule for non-specified measure types
 
-(define-public (default-auto-beam-check translator dir test)
+(define-public (default-auto-beam-check context dir test)
   (define (get name default)
-    (let ((value (ly:translator-property translator name)))
+    (let ((value (ly:context-property context name)))
       (if (not (null? value)) value default)))
 
-  (if (!= (ly:moment-grace-numerator (ly:translator-now translator)) 0)
+  (if (!= (ly:moment-grace-numerator (ly:context-now context)) 0)
       ;; No auto beaming for grace notes
       #f
       (let* ((beat-length (get 'beatLength (ly:make-moment 1 1)))