]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/text-item.cc (interpret_string): new file, select font with
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 9 Apr 2004 23:17:50 +0000 (23:17 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 9 Apr 2004 23:17:50 +0000 (23:17 +0000)
encoding.

* lily/include/lily-guile.hh: ly_XXX_p -> is_XXX. Changes throughout.

* scm/define-markup-commands.scm (encoded-simple): new markup command.

* lily/parser.yy (markup): take encoding from lexer.

176 files changed:
ChangeLog
lily/accidental-engraver.cc
lily/accidental-placement.cc
lily/accidental.cc
lily/align-interface.cc
lily/all-font-metrics.cc
lily/ambitus.cc
lily/arpeggio.cc
lily/auto-beam-engraver.cc
lily/auto-change-iterator.cc
lily/axis-group-interface.cc
lily/balloon.cc
lily/bar-engraver.cc
lily/bar-line.cc
lily/bar-number-engraver.cc
lily/beam-quanting.cc
lily/beam.cc
lily/break-align-engraver.cc
lily/break-align-interface.cc
lily/break-substitution.cc
lily/chord-name-engraver.cc
lily/clef-engraver.cc
lily/clef.cc
lily/cluster-engraver.cc
lily/cluster.cc
lily/coherent-ligature-engraver.cc
lily/completion-note-heads-engraver.cc
lily/context-def.cc
lily/context-scheme.cc
lily/context-specced-music-iterator.cc
lily/context.cc
lily/custos-engraver.cc
lily/custos.cc
lily/dots.cc
lily/drum-note-engraver.cc
lily/drum-note-performer.cc
lily/duration.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/engraver-group-engraver.cc
lily/event-chord-iterator.cc
lily/event.cc
lily/extender-engraver.cc
lily/figured-bass-engraver.cc
lily/fingering-engraver.cc
lily/font-metric.cc
lily/font-select.cc
lily/font-size-engraver.cc
lily/forbid-break-engraver.cc
lily/function-documentation.cc
lily/global-context.cc
lily/gourlay-breaking.cc
lily/grob-interface.cc
lily/grob-pq-engraver.cc
lily/grob-property.cc
lily/grob-scheme.cc
lily/grob.cc
lily/hara-kiri-group-spanner.cc
lily/hyphen-engraver.cc
lily/include/group-interface.hh
lily/include/lily-guile.hh
lily/include/ly-module.hh
lily/include/paper-def.hh
lily/include/text-item.hh
lily/input-file-results.cc
lily/input-smob.cc
lily/instrument-name-engraver.cc
lily/item.cc
lily/key-engraver.cc
lily/key-signature-interface.cc
lily/kpath.cc
lily/lexer.ll
lily/lily-guile.cc
lily/line-interface.cc
lily/line-spanner.cc
lily/lookup.cc
lily/ly-module.cc
lily/lyric-combine-music-iterator.cc
lily/lyric-combine-music.cc
lily/lyric-engraver.cc
lily/lyric-performer.cc
lily/mark-engraver.cc
lily/measure-grouping-engraver.cc
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/music-iterator.cc
lily/music-output-def.cc
lily/music-sequence.cc
lily/music.cc
lily/my-lily-lexer.cc
lily/my-lily-parser.cc
lily/new-fingering-engraver.cc
lily/new-lyric-combine-music-iterator.cc
lily/note-collision.cc
lily/note-column.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/note-spacing.cc
lily/ottava-bracket.cc
lily/ottava-engraver.cc
lily/output-property-engraver.cc
lily/paper-book.cc
lily/paper-column.cc
lily/paper-def.cc
lily/paper-outputter.cc
lily/parser.yy
lily/part-combine-iterator.cc
lily/performer-group-performer.cc
lily/piano-pedal-engraver.cc
lily/piano-pedal-performer.cc
lily/pitch-squash-engraver.cc
lily/property-iterator.cc
lily/quote-iterator.cc
lily/recording-group-engraver.cc
lily/repeat-acknowledge-engraver.cc
lily/repeated-music.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/rhythmic-head.cc
lily/scaled-font-metric.cc
lily/scm-hash.cc
lily/score-engraver.cc
lily/score.cc
lily/script-column.cc
lily/script-engraver.cc
lily/script.cc
lily/self-aligment-interface.cc
lily/separating-group-spanner.cc
lily/separation-item.cc
lily/sequential-iterator.cc
lily/side-position-interface.cc
lily/simple-spacer.cc
lily/simultaneous-music-iterator.cc
lily/slur.cc
lily/spaceable-grob.cc
lily/spacing-spanner.cc
lily/span-arpeggio-engraver.cc
lily/span-bar-engraver.cc
lily/span-bar.cc
lily/staff-performer.cc
lily/staff-spacing.cc
lily/staff-symbol-referencer.cc
lily/staff-symbol.cc
lily/stanza-number-engraver.cc
lily/stem-engraver.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/stencil-scheme.cc
lily/sustain-pedal.cc
lily/system-start-delimiter-engraver.cc
lily/system-start-delimiter.cc
lily/system.cc
lily/tab-note-heads-engraver.cc
lily/text-engraver.cc
lily/text-item.cc
lily/text-spanner.cc
lily/tfm.cc
lily/tie-engraver.cc
lily/tie-performer.cc
lily/tie.cc
lily/time-signature-engraver.cc
lily/time-signature-performer.cc
lily/time-signature.cc
lily/timing-engraver.cc
lily/timing-translator.cc
lily/translator-ctors.cc
lily/translator-group.cc
lily/translator-property.cc
lily/tuplet-bracket.cc
lily/tuplet-engraver.cc
lily/unfolded-repeat-iterator.cc
lily/virtual-font-metric.cc
lily/volta-bracket.cc
lily/volta-engraver.cc
scm/define-markup-commands.scm

index 3eac569face82eb5df28b4cc201322b999d9c5c5..da67305e4264dde935c2f77f011c740d036560a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,17 @@
 2004-04-10  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/text-item.cc (interpret_string): new file, select font with
+       encoding.
+
+       * lily/include/lily-guile.hh: ly_XXX_p -> is_XXX. Changes throughout.
+
+       * scm/define-markup-commands.scm (encoded-simple): new markup command.
+
        * lily/parser.yy (markup): take encoding from lexer.
 
 2004-04-09  Jan Nieuwenhuizen  <janneke@gnu.org>
 
-       * lily/kpath.cc (kpathsea_find_tfm): Do not trigger TMF generation.
+       * lily/kpath.cc (kpathsea_find_tfm): Do not trigger TFM generation.
 
        * scm/output-ps.scm: Remove some cruft.
 
index 2d57f9fbf99e84c593b51612e71cb3aac8f9f0c2..7d19220de4dfbe907399744df59e277c9c5f606a 100644 (file)
@@ -73,7 +73,7 @@ static void
 set_property_on_children (Context * trans, const char * sym, SCM val)
 {
   trans->set_property (sym, val);
-  for (SCM p = trans->context_list_; ly_pair_p (p); p = ly_cdr (p))
+  for (SCM p = trans->context_list_; is_pair (p); p = ly_cdr (p))
     {
       Context *trg =  unsmob_context (ly_car (p));
       set_property_on_children (trg, sym, ly_deep_copy (val));
@@ -127,7 +127,7 @@ number_accidentals_from_sig (bool *different,
     prev = scm_assoc (scm_cons (scm_int2num (o), scm_int2num (n)), sig);
 
   /* should really be true unless prev == SCM_BOOL_F */
-  if (ly_pair_p (prev) && ly_pair_p (ly_cdr (prev)))
+  if (is_pair (prev) && is_pair (ly_cdr (prev)))
     {
       accbarnum_i = ly_scm2int (ly_cddr (prev));
       prev = scm_cons (ly_car (prev), ly_cadr (prev));
@@ -135,16 +135,16 @@ number_accidentals_from_sig (bool *different,
   
   /* If an accidental was not found or the accidental was too old */
   if (prev == SCM_BOOL_F ||
-      (ly_number_p (lazyness) && curbarnum_i > accbarnum_i + ly_scm2int (lazyness)))
+      (is_number (lazyness) && curbarnum_i > accbarnum_i + ly_scm2int (lazyness)))
     prev = scm_assoc (scm_int2num (n), sig);
 
 
   SCM prev_acc = (prev == SCM_BOOL_F) ? scm_int2num (0) : ly_cdr (prev);
 
-  int p = ly_number_p (prev_acc) ? ly_scm2int (prev_acc) : 0;
+  int p = is_number (prev_acc) ? ly_scm2int (prev_acc) : 0;
 
   int num;
-  if (a == p && ly_number_p (prev_acc))
+  if (a == p && is_number (prev_acc))
     num = 0;
   else if ( (abs (a)<abs (p) || p*a<0) && a != 0 )
     num = 2;
@@ -163,24 +163,24 @@ number_accidentals (bool *different,
   int number = 0;
 
   *different = false;
-  if (ly_pair_p (accidentals) && !ly_symbol_p (ly_car (accidentals)))
+  if (is_pair (accidentals) && !is_symbol (ly_car (accidentals)))
     warning (_f ("Accidental typesetting list must begin with context-name: %s", 
                 ly_scm2string (ly_car (accidentals)).to_str0 ()));
   
-  for (; ly_pair_p (accidentals) && origin; accidentals = ly_cdr (accidentals))
+  for (; is_pair (accidentals) && origin; accidentals = ly_cdr (accidentals))
     {
       // If pair then it is a new accidentals typesetting rule to be checked
       SCM rule = ly_car (accidentals);
-      if (ly_pair_p (rule))
+      if (is_pair (rule))
        {
          SCM type = ly_car (rule);
          SCM lazyness = ly_cdr (rule);
          SCM localsig = origin->get_property ("localKeySignature");
          
          bool same_octave_b = 
-           ly_eq_p (ly_symbol2scm ("same-octave"), type);
+           is_eq (ly_symbol2scm ("same-octave"), type);
          bool any_octave_b = 
-           ly_eq_p (ly_symbol2scm ("any-octave"), type);
+           is_eq (ly_symbol2scm ("any-octave"), type);
 
          if (same_octave_b || any_octave_b)
            {
@@ -199,7 +199,7 @@ number_accidentals (bool *different,
       /*
        if symbol then it is a context name. Scan parent contexts to find it.
       */
-      else if (ly_symbol_p (rule))
+      else if (is_symbol (rule))
        {
          Context * dad = origin;
          while (dad && !dad->is_alias (rule))
@@ -223,7 +223,7 @@ Accidental_engraver::get_bar_num ()
       
   Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
   if (mp.main_part_ < Rational (0)
-      && ly_number_p (barnum))
+      && is_number (barnum))
     barnum = scm_int2num (ly_scm2int (barnum) - 1);
       
   return barnum ;
@@ -441,7 +441,7 @@ Accidental_engraver::acknowledge_grob (Grob_info info)
       && Rhythmic_head::has_interface (info.grob_))
     {
       if (to_boolean ( get_property ("harmonicAccidentals"))
-         || !ly_equal_p (info.grob_->get_property ("style"),
+         || !is_equal (info.grob_->get_property ("style"),
                          ly_symbol2scm ("harmonic")))
        {
          
index ccb2bbf92745766d9fe10b2841fa9f0e6e775f33..c45947629e07484ac520ee7b6f21fb2c53b44c3f 100644 (file)
@@ -81,9 +81,9 @@ Accidental_placement::split_accidentals (Grob * accs,
                                         Link_array<Grob> *break_reminder,
                                         Link_array<Grob> *real_acc)
 {
-  for (SCM acs =accs->get_property ("accidental-grobs"); ly_pair_p (acs);
+  for (SCM acs =accs->get_property ("accidental-grobs"); is_pair (acs);
        acs =ly_cdr (acs))
-    for (SCM s = ly_cdar (acs); ly_pair_p (s); s = ly_cdr (s))
+    for (SCM s = ly_cdar (acs); is_pair (s); s = ly_cdr (s))
       {
        Grob *a = unsmob_grob (ly_car (s));
 
@@ -260,12 +260,12 @@ Accidental_placement::position_accidentals (Grob * me)
     Y-position, they share an Ape, and will be printed in overstrike.
    */
   Link_array<Accidental_placement_entry> apes;
-  for (SCM s = accs; ly_pair_p (s); s =ly_cdr (s))
+  for (SCM s = accs; is_pair (s); s =ly_cdr (s))
     {
       Accidental_placement_entry *ape = new Accidental_placement_entry;
       ape->notename_ = ly_scm2int (ly_caar (s));
       
-      for (SCM t = ly_cdar (s); ly_pair_p (t); t =ly_cdr (t))
+      for (SCM t = ly_cdar (s); is_pair (t); t =ly_cdr (t))
        ape->grobs_.push (unsmob_grob (ly_car (t)));
 
       apes.push (ape);
index e4985830d1efc2265beecb49c819fbf1d3c3cf31..8de4544957dc6674dc527dd79febb56e9b0e3a16 100644 (file)
@@ -60,13 +60,13 @@ Accidental_interface::accurate_boxes (Grob *a,Grob**common)
   if (to_boolean (a->get_property ("cautionary")))
     {
       SCM cstyle = a->get_property ("cautionary-style");
-      parens = ly_equal_p (cstyle, ly_symbol2scm ("parentheses"));
+      parens = is_equal (cstyle, ly_symbol2scm ("parentheses"));
 
     }
 
   SCM accs = a->get_property ("accidentals");
   SCM scm_style = a->get_property ("style");
-  if (!ly_symbol_p (scm_style)
+  if (!is_symbol (scm_style)
       && !parens
       && scm_ilength (accs) == 1)
     {
@@ -175,13 +175,13 @@ Accidental_interface::print (SCM smob)
   if (caut)
     {
       SCM cstyle = me->get_property ("cautionary-style");
-      parens = ly_equal_p (cstyle, ly_symbol2scm ("parentheses"));
-      smaller = ly_equal_p (cstyle, ly_symbol2scm ("smaller"));
+      parens = is_equal (cstyle, ly_symbol2scm ("parentheses"));
+      smaller = is_equal (cstyle, ly_symbol2scm ("smaller"));
     }
 
   SCM scm_style = me->get_property ("style");
   String style;
-  if (ly_symbol_p (scm_style))
+  if (is_symbol (scm_style))
     {
       style = ly_symbol2string (scm_style);
     }
@@ -208,7 +208,7 @@ Accidental_interface::print (SCM smob)
 
   Stencil mol;
   for (SCM s = me->get_property ("accidentals");
-       ly_pair_p (s); s = ly_cdr (s))
+       is_pair (s); s = ly_cdr (s))
     {
       int alteration = ly_scm2int (ly_car (s));
       String font_char = get_fontcharname (style, alteration);
index 2cc4c182e712051fb42c2a97df837d50f287b2f7..1fe7d172ba7beddd0826438ae0ea122f3053db05 100644 (file)
@@ -52,7 +52,7 @@ Align_interface::align_to_fixed_distance (Grob *me , Axis a)
   
   SCM d =   me->get_property ("stacking-dir");
   
-  Direction stacking_dir = ly_number_p (d) ? to_dir (d) : CENTER;
+  Direction stacking_dir = is_number (d) ? to_dir (d) : CENTER;
   if (!stacking_dir)
     stacking_dir = DOWN;
 
@@ -124,7 +124,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
   
   SCM d =   me->get_property ("stacking-dir");
   
-  Direction stacking_dir = ly_number_p (d) ? to_dir (d) : CENTER;
+  Direction stacking_dir = is_number (d) ? to_dir (d) : CENTER;
   if (!stacking_dir)
     stacking_dir = DOWN;
   
@@ -216,7 +216,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
        FIXME: uncommenting freaks out the Y-alignment of
        line-of-score.
        */
-      if (ly_number_p (align))
+      if (is_number (align))
        center_offset = total.linear_combination (ly_scm2double (align));
 
       for (int j = 0 ;  j < all_grobs.size (); j++)
@@ -253,7 +253,7 @@ find_fixed_alignment_parent  (Grob *g)
 {
   while (g)
     {
-      if (ly_number_p (g->get_property ("forced-distance")))
+      if (is_number (g->get_property ("forced-distance")))
        return g;
 
       g = g->get_parent (Y_AXIS);
index f878338bcb3ec93263559f859db9931cbecc8a52..6b4b63803f7b777838f6393ea4cd8c78ca2b61ff 100644 (file)
@@ -212,7 +212,7 @@ LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0,
           (SCM name),
           "Load the font @var{name}. ")
 {
-  SCM_ASSERT_TYPE (ly_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
 
   Font_metric * fm = all_fonts_global->find_font (ly_scm2string (name));
 
index 33c8122e420abfd8ed871249a8267bbd85939f27..2320c9fba159bfde0686bee945d45c93aaec566f 100644 (file)
@@ -90,7 +90,7 @@ number_accidentals (SCM key_signature, Pitch *pitch,
                     key_signature);
 
   /* should really be true unless prev == SCM_BOOL_F */
-  if (ly_pair_p (prev) && ly_pair_p (ly_cdr (prev)))
+  if (is_pair (prev) && is_pair (ly_cdr (prev)))
     {
       prev = scm_cons (ly_car (prev), ly_cadr (prev));
     }
@@ -100,7 +100,7 @@ number_accidentals (SCM key_signature, Pitch *pitch,
     prev = scm_assoc (scm_int2num (notename), key_signature);
 
   SCM prev_acc = (prev == SCM_BOOL_F) ? scm_int2num (0) : ly_cdr (prev);
-  int sig_alteration = ly_number_p (prev_acc) ? ly_scm2int (prev_acc) : 0;
+  int sig_alteration = is_number (prev_acc) ? ly_scm2int (prev_acc) : 0;
 
   if (alteration == sig_alteration) // no accidental at all needed
     return 0;
@@ -149,7 +149,7 @@ Ambitus::print (SCM smob)
 
   SCM scm_note_head_style = me->get_property ("note-head-style");
   String note_head_style;
-  if (ly_symbol_p (scm_note_head_style))
+  if (is_symbol (scm_note_head_style))
     {
       String note_head_style =
        ly_symbol2string (scm_note_head_style);
@@ -195,7 +195,7 @@ Ambitus::print (SCM smob)
     }
 
   SCM c0 = me->get_property ("c0-position");
-  if (ly_number_p (c0))
+  if (is_number (c0))
     {
       p_min += ly_scm2int (c0);
       p_max += ly_scm2int (c0);
@@ -244,7 +244,7 @@ Ambitus::print (SCM smob)
   SCM key_signature = me->get_property ("key-signature");
   SCM scm_accidentals_style = me->get_property ("accidentals-style");
   String accidentals_style;
-  if (ly_symbol_p (scm_accidentals_style))
+  if (is_symbol (scm_accidentals_style))
     {
       accidentals_style =
        ly_symbol2string (scm_accidentals_style);
index cfe86ca4f994ea92b6fd80d98448f117b8a8a52f..8cf27663c1a0b3ec8242d83e296be1eb4f40425a 100644 (file)
@@ -25,7 +25,7 @@ Arpeggio::print (SCM smob)
   Grob *me = unsmob_grob (smob);
   
   Grob * common = me;
-  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); is_pair (s); s = ly_cdr (s))
     {
       Grob * stem =  unsmob_grob (ly_car (s));
       common =  common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem),
@@ -43,7 +43,7 @@ Arpeggio::print (SCM smob)
   Interval heads;
   Real my_y = me->relative_coordinate (common, Y_AXIS);
       
-  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); is_pair (s); s = ly_cdr (s))
     {
       Grob * stem = unsmob_grob (ly_car (s));
       Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem);
@@ -104,7 +104,7 @@ Arpeggio::brew_chord_bracket (SCM smob)
   Grob *me = unsmob_grob (smob);
   
   Grob * common = me;
-  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); is_pair (s); s = ly_cdr (s))
     {
       Grob * stem =  unsmob_grob (ly_car (s));
       common =  common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem),
@@ -114,7 +114,7 @@ Arpeggio::brew_chord_bracket (SCM smob)
   Interval heads;
   Real my_y = me->relative_coordinate (common, Y_AXIS);
       
-  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); is_pair (s); s = ly_cdr (s))
     {
       Grob * stem = unsmob_grob (ly_car (s));
       Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem);
index 77b707438cbdb814312dfc17c7585a4edbca84e1..c5b3a4641a32bdea2d059610e3d552281730e0b8 100644 (file)
@@ -78,7 +78,7 @@ private:
 void
 Auto_beam_engraver::process_music ()
 {
-  if (ly_string_p (get_property ("whichBar")))
+  if (is_string (get_property ("whichBar")))
     {
       consider_end (shortest_mom_);
       junk_beam ();
index 000e0417d07f901d34024172111429adf0d7b020..365d0cfbcae5dce972610658dd8ee06586b5407e 100644 (file)
@@ -91,7 +91,7 @@ Auto_change_iterator::process (Moment m)
   Moment now = get_outlet ()->now_mom ();
   Moment *splitm = 0;
   
-  for (; ly_pair_p (split_list_); split_list_ = ly_cdr (split_list_))
+  for (; is_pair (split_list_); split_list_ = ly_cdr (split_list_))
     {
       splitm = unsmob_moment (ly_caar (split_list_));
       if ((*splitm + start_moment_) > now)
index b7ce9afd3d182f131551e21242801de50a4a9453..d07ed65005d1923b74054797a4b43abed5e9dc65 100644 (file)
@@ -41,7 +41,7 @@ Interval
 Axis_group_interface::relative_group_extent (Axis a, Grob *common, SCM elts)
 {
   Interval r;
-  for (SCM s = elts; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = elts; is_pair (s); s = ly_cdr (s))
     {
       Grob * se = unsmob_grob (ly_car (s));
       Interval dims = se->extent (common, a);
@@ -75,7 +75,7 @@ Axis_group_interface::set_axes (Grob*me,Axis a1, Axis a2)
 
   SCM axes = me->get_property ("axes");
   
-  if (!ly_pair_p (axes)
+  if (!is_pair (axes)
       || scm_c_memq (sa1, axes) == SCM_BOOL_F
       || scm_c_memq (sa2, axes) == SCM_BOOL_F)
     {
@@ -108,7 +108,7 @@ Axis_group_interface::get_children (Grob*me)
   if (!has_interface (me))
     return childs;
   
-  for (SCM ep = me->get_property ("elements"); ly_pair_p (ep); ep = ly_cdr (ep))
+  for (SCM ep = me->get_property ("elements"); is_pair (ep); ep = ly_cdr (ep))
     {
       Grob* e = unsmob_grob (ly_car (ep));
       if (e)
index 0b4dd2e98d36fe00253c91fda343ba723b58b517..6d1b0b07783d0a3fd1f26177ec70f07a15264666 100644 (file)
@@ -29,7 +29,7 @@ Balloon_interface::print (SCM smob)
   SCM cb = me->get_property ("balloon-original-callback");
   SCM scm_mol  =  SCM_EOL;
 
-  if (ly_procedure_p (cb))
+  if (is_procedure (cb))
     {
       scm_mol = scm_call_1 (cb, smob);
     }
index 2feb5f12a71a5a964f3a06002b76ade104946aad..3802d20f6d6a68619e107223623b4cf0f5d6ae6a 100644 (file)
@@ -77,7 +77,7 @@ Bar_engraver::finalize ()
 void
 Bar_engraver::process_acknowledged_grobs ()
 {
-  if (!bar_ && ly_string_p (get_property ("whichBar")))
+  if (!bar_ && is_string (get_property ("whichBar")))
     {
       create_bar ();
     }
index ada699b27137e18c1edc6ed9325b9c7fb515f4c3..c112c3ddf46987aaca542b1c489885632047243d 100644 (file)
@@ -30,7 +30,7 @@ Bar_line::print (SCM smob)
 
   SCM s = me->get_property ("glyph");
   SCM barsiz_proc = me->get_property ("bar-size-procedure");
-  if (ly_string_p (s) && ly_procedure_p (barsiz_proc))
+  if (is_string (s) && is_procedure (barsiz_proc))
     {
       String str  =ly_scm2string (s);
       SCM siz = scm_call_1 (barsiz_proc, me->self_scm ());
@@ -157,20 +157,20 @@ Bar_line::before_line_breaking (SCM smob)
   SCM g = me->get_property ("glyph");
   SCM orig = g;
   Direction bsd = item->break_status_dir ();
-  if (ly_string_p (g) && bsd)
+  if (is_string (g) && bsd)
     {
       SCM proc = me->get_property ("break-glyph-function");
       g = scm_call_2 (proc, g, scm_int2num (bsd));
     }
   
-  if (!ly_string_p (g))
+  if (!is_string (g))
     {
       me->set_property ("print-function", SCM_EOL);
       me->set_extent (SCM_EOL, X_AXIS);
       // leave y_extent for spanbar? 
     }
 
-  if (! ly_equal_p (g, orig))
+  if (! is_equal (g, orig))
     me->set_property ("glyph", g);
 
   return SCM_UNSPECIFIED;
@@ -186,7 +186,7 @@ Bar_line::get_staff_bar_size (SCM smob)
   Grob*me = unsmob_grob (smob);
   Real ss = Staff_symbol_referencer::staff_space (me);
   SCM size = me->get_property ("bar-size");
-  if (ly_number_p (size))
+  if (is_number (size))
     return scm_make_real (ly_scm2double (size)*ss);
   else if (Staff_symbol_referencer::get_staff_symbol (me))
     {
index 75a147f6bd9e7b930a11385aebddb448403e5786..df7af56bef0537e1d821636ee41afc55aa4bad10 100644 (file)
@@ -45,7 +45,7 @@ Bar_number_engraver::process_music ()
 
   SCM wb = get_property ("whichBar");
   
-  if (ly_string_p (wb))
+  if (is_string (wb))
     {
       SCM smp = get_property ("measurePosition");
       
@@ -54,7 +54,7 @@ Bar_number_engraver::process_music ()
        {
          SCM bn = get_property ("currentBarNumber");
          SCM proc = get_property ("barNumberVisibility");
-         if (ly_number_p (bn) && ly_procedure_p (proc)
+         if (is_number (bn) && is_procedure (proc)
              && to_boolean (scm_call_1(proc, bn)))
            {
              create_items ();
index 7bb434318f10d9e15cc361f32d7cf15aee3d0e8a..d8d97cba92dd974781c594fe738e3c34194fa92c 100644 (file)
@@ -110,7 +110,7 @@ Beam::quanting (SCM smob)
   Real slt = Staff_symbol_referencer::line_thickness (me) / ss;
 
   SCM sdy = me->get_property ("least-squares-dy");
-  Real dy_mus = ly_number_p (sdy) ? ly_scm2double (sdy) : 0.0;
+  Real dy_mus = is_number (sdy) ? ly_scm2double (sdy) : 0.0;
   
   Real straddle = 0.0;
   Real sit = (thickness - slt) / 2;
@@ -282,7 +282,7 @@ Beam::quanting (SCM smob)
 #if DEBUG_QUANTING
   SCM inspect_quants = me->get_property ("inspect-quants");
   if (debug_beam_quanting_flag
-      && ly_pair_p (inspect_quants))
+      && is_pair (inspect_quants))
     {
       Drul_array<Real> ins = ly_scm2interval (inspect_quants);
 
index c75fc58882713bc7162e5fd2b4c6ef64ff5a78af..91b0fb55434813ae54de019268432ddbbbdbc220 100644 (file)
@@ -79,7 +79,7 @@ Beam::get_beam_translation (Grob *me)
 {
   SCM func = me->get_property ("space-function");
 
-  if (ly_procedure_p (func))
+  if (is_procedure (func))
     {
       SCM s = scm_call_2 (func, me->self_scm (), scm_int2num (get_beam_count (me)));
       return ly_scm2double (s);
@@ -95,7 +95,7 @@ int
 Beam::get_beam_count (Grob *me) 
 {
   int m = 0;
-  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); is_pair (s); s = ly_cdr (s))
     {
       Grob *stem = unsmob_grob (ly_car (s));
       m = m >? (Stem::beam_multiplicity (stem).length () + 1);
@@ -209,7 +209,7 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming,
        (i - lslice[left_dir])* left_dir <= 0 ; i+= left_dir) 
     {
       int count =0;
-      for ( SCM s = ly_car (right_beaming); ly_pair_p (s); s = ly_cdr (s))
+      for ( SCM s = ly_car (right_beaming); is_pair (s); s = ly_cdr (s))
        {
          int k = - right_dir * ly_scm2int (ly_car (s)) + i;
          if (scm_c_memq (scm_int2num (k), left_beaming) != SCM_BOOL_F)
@@ -242,7 +242,7 @@ Beam::connect_beams (Grob *me)
       SCM this_beaming = this_stem->get_property ("beaming");
 
       Direction this_dir = get_grob_direction (this_stem);
-      if (ly_pair_p (last_beaming) && ly_pair_p (this_beaming))
+      if (is_pair (last_beaming) && is_pair (this_beaming))
        {
          int start_point = position_with_maximal_common_beams
            (last_beaming, this_beaming,
@@ -257,7 +257,7 @@ Beam::connect_beams (Grob *me)
              
              new_slice.set_empty ();
              SCM s = index_get_cell (this_beaming, d);
-             for (; ly_pair_p (s); s = ly_cdr (s))
+             for (; is_pair (s); s = ly_cdr (s))
                {
                  int new_beam_pos =
                    start_point - this_dir * ly_scm2int (ly_car (s));
@@ -277,7 +277,7 @@ Beam::connect_beams (Grob *me)
        {
          scm_set_car_x ( this_beaming, SCM_EOL);
          SCM s = ly_cdr (this_beaming);
-         for (; ly_pair_p (s); s = ly_cdr (s))
+         for (; is_pair (s); s = ly_cdr (s))
            {
              int np = - this_dir * ly_scm2int (ly_car (s));
              scm_set_car_x (s, scm_int2num (np));
@@ -377,7 +377,7 @@ Beam::print (SCM grob)
       Array<int> rfliebertjes;   
 
       for (SCM s = left;
-          ly_pair_p (s); s =ly_cdr (s))
+          is_pair (s); s =ly_cdr (s))
        {
          int b = ly_scm2int (ly_car (s));
          if (scm_c_memq (ly_car (s), right) != SCM_BOOL_F)
@@ -390,7 +390,7 @@ Beam::print (SCM grob)
            }
        }
       for (SCM s = right;
-          ly_pair_p (s); s =ly_cdr (s))
+          is_pair (s); s =ly_cdr (s))
        {
          int b = ly_scm2int (ly_car (s));
          if (scm_c_memq (ly_car (s), left) == SCM_BOOL_F)
@@ -421,7 +421,7 @@ Beam::print (SCM grob)
       Stencil gapped;
 
       int gap_count = 0;
-      if (ly_number_p (me->get_property ("gap-count")))
+      if (is_number (me->get_property ("gap-count")))
        {
          gap_count = ly_scm2int (me->get_property ("gap-count"));
          gapped = Lookup::beam (dydx, w - 2 * gap_length, thick, blot);
@@ -511,7 +511,7 @@ Beam::print (SCM grob)
 #if (DEBUG_QUANTING)
   SCM quant_score = me->get_property ("quant-score");
   if (debug_beam_quanting_flag
-      && ly_string_p (quant_score))
+      && is_string (quant_score))
     {
       
       /*
@@ -570,7 +570,7 @@ Beam::get_default_dir (Grob *me)
                    scm_cons (scm_int2num (total[UP]),
                             scm_int2num (total[DOWN])));
 
-  if (ly_number_p (s) && ly_scm2int (s))
+  if (is_number (s) && ly_scm2int (s))
     return to_dir (s);
   
   /* If dir is not determined: get default */
@@ -666,7 +666,7 @@ void
 Beam::consider_auto_knees (Grob* me)
 {
   SCM scm = me->get_property ("auto-knee-gap");
-  if (!ly_number_p (scm))
+  if (!is_number (scm))
     return ;
 
   Real threshold = ly_scm2double (scm);
@@ -830,7 +830,7 @@ Beam::position_beam (Grob *me)
     {
       // one wonders if such genericity is necessary  --hwn.
       SCM callbacks = me->get_property ("position-callbacks");
-      for (SCM i = callbacks; ly_pair_p (i); i = ly_cdr (i))
+      for (SCM i = callbacks; is_pair (i); i = ly_cdr (i))
        scm_call_1 (ly_car (i), me->self_scm ());
     }
 
@@ -1101,7 +1101,7 @@ Beam::check_concave (SCM smob)
   */
   bool is_concave1 = false;
   SCM gap = me->get_property ("concaveness-gap");
-  if (ly_number_p (gap))
+  if (is_number (gap))
     {
       Real r1 = ly_scm2double (gap);
       Real dy = Stem::chord_start_y (stems.top ())
@@ -1138,7 +1138,7 @@ Beam::check_concave (SCM smob)
   Real concaveness2 = 0;
   SCM thresh = me->get_property ("concaveness-threshold");
   Real r2 = infinity_f;
-  if (!is_concave1 && ly_number_p (thresh))
+  if (!is_concave1 && is_number (thresh))
     {
       r2 = ly_scm2double (thresh);
       
@@ -1223,7 +1223,7 @@ where_are_the_whole_beams (SCM beaming)
 {
   Slice l; 
   
-  for ( SCM s = ly_car (beaming); ly_pair_p (s) ; s = ly_cdr (s))
+  for ( SCM s = ly_car (beaming); is_pair (s) ; s = ly_cdr (s))
     {
       if (scm_c_memq (ly_car (s), ly_cdr (beaming)) != SCM_BOOL_F)
        
@@ -1297,7 +1297,7 @@ Beam::set_stem_lengths (Grob *me)
 
   bool gap = false;
   Real thick =0.0;
-  if (ly_number_p (me->get_property ("gap-count"))
+  if (is_number (me->get_property ("gap-count"))
       &&ly_scm2int (me->get_property ("gap-count")))
     {
       gap = true;
@@ -1455,7 +1455,7 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis)
   Grob *rest = unsmob_grob (element_smob);
   Axis a = (Axis) ly_scm2int (axis);
 
-  if (ly_number_p (rest->get_property ("staff-position")))
+  if (is_number (rest->get_property ("staff-position")))
     return scm_int2num (0);
   
   assert (a == Y_AXIS);
@@ -1472,7 +1472,7 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis)
 
   Drul_array<Real> pos (0, 0);
   SCM s = beam->get_property ("positions");
-  if (ly_pair_p (s) && ly_number_p (ly_car (s)))
+  if (is_pair (s) && is_number (ly_car (s)))
     pos = ly_scm2interval (s);
   Real staff_space = Staff_symbol_referencer::staff_space (rest);
 
@@ -1525,12 +1525,12 @@ bool
 Beam::is_knee (Grob* me)
 {
   SCM k = me->get_property ("knee");
-  if (ly_boolean_p (k))
+  if (is_boolean (k))
     return ly_scm2bool (k);
 
   bool knee = false;
   int d = 0;
-  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); is_pair (s); s = ly_cdr (s))
     {
       Direction dir = get_grob_direction (unsmob_grob (ly_car (s)));
       if (d && d != dir)
index 66f893c79f0b62640fa571739d5e03208d8cef6c..4053a63b2c48972ef2c12355e5d736d8da1b26a5 100644 (file)
@@ -48,7 +48,7 @@ Break_align_engraver::finalize ()
 void
 Break_align_engraver::stop_translation_timestep ()
 {
-  for (SCM p = column_alist_; ly_pair_p (p); p = ly_cdr (p))
+  for (SCM p = column_alist_; is_pair (p); p = ly_cdr (p))
     {
       SCM pair = ly_car (p);
       add_column (ly_cdr (pair));
@@ -92,7 +92,7 @@ Break_align_engraver::acknowledge_grob (Grob_info inf)
        return ;
 
       SCM align_name = item->get_property ("break-align-symbol");
-      if (!ly_symbol_p (align_name))
+      if (!is_symbol (align_name))
        return ;
 
       if (!align_)
index 363f505fafc30d7dedf92d424f2c8809489532cb..a79998b989572baf9e408879640767253f9f7b9e 100644 (file)
@@ -76,7 +76,7 @@ Break_align_interface::ordered_elements (Grob *grob)
   Item *me  = dynamic_cast<Item*> (grob);
   SCM elts = me->get_property ("elements");
   SCM order_vec = me->get_property ("break-align-orders");
-  if (!ly_vector_p (order_vec)
+  if (!is_vector (order_vec)
       || ly_vector_length (order_vec) < 3)
     return  Pointer_group_interface__extract_grobs (me, (Grob*)0,
                                                    "elements");
@@ -88,11 +88,11 @@ Break_align_interface::ordered_elements (Grob *grob)
     Copy in order specified in BREAK-ALIGN-ORDER.
   */
   Link_array<Grob> new_elts;
-  for (; ly_pair_p (order); order = ly_cdr (order))
+  for (; is_pair (order); order = ly_cdr (order))
     {
       SCM sym = ly_car (order);
       
-      for (SCM s =elts; ly_pair_p (s); s = ly_cdr (s))
+      for (SCM s =elts; is_pair (s); s = ly_cdr (s))
        {
          Grob *g = unsmob_grob (ly_car (s));
          if (g && sym == g->get_property ("break-align-symbol"))
@@ -161,7 +161,7 @@ Break_align_interface::do_alignment (Grob *grob)
        Find the first grob with a space-alist entry.
        */
       for (SCM s = l->get_property ("elements");
-          ly_pair_p (s) ; s = ly_cdr (s))
+          is_pair (s) ; s = ly_cdr (s))
          {
            Grob *elt = unsmob_grob (ly_car (s));
 
@@ -171,7 +171,7 @@ Break_align_interface::do_alignment (Grob *grob)
              edge_idx = idx;
            
            SCM l =elt->get_property ("space-alist");
-           if (ly_pair_p (l))
+           if (is_pair (l))
              {
                alist= l;
                break;
@@ -186,7 +186,7 @@ Break_align_interface::do_alignment (Grob *grob)
        reason.
       */
       for (SCM s = r ? r->get_property ("elements") : SCM_EOL;
-          !ly_symbol_p (rsym) && ly_pair_p (s); s = ly_cdr (s))
+          !is_symbol (rsym) && is_pair (s); s = ly_cdr (s))
        {
          Grob * elt =unsmob_grob (ly_car (s));
 
@@ -197,14 +197,14 @@ Break_align_interface::do_alignment (Grob *grob)
        edge_idx = next_idx;
 
       SCM entry = SCM_EOL;
-      if (ly_symbol_p (rsym))
+      if (is_symbol (rsym))
        entry = scm_assq (rsym, alist);
 
-      bool entry_found = ly_pair_p (entry);
+      bool entry_found = is_pair (entry);
       if (!entry_found)
        {
          String sym_string;
-         if (ly_symbol_p (rsym))
+         if (is_symbol (rsym))
            sym_string = ly_symbol2string (rsym);
 
          String orig_string ;
index cd1ff04703ee9a69451ba91195173a30d9d38369..f19cece1d5b9e4bb94bd847250283f9b8286250a 100644 (file)
@@ -91,7 +91,7 @@ do_break_substitution (SCM src)
  
   if (unsmob_grob (src))
     return substitute_grob (unsmob_grob (src));
-  else if (ly_vector_p (src))
+  else if (is_vector (src))
     {
       int len = SCM_VECTOR_LENGTH (src);
       SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
@@ -102,7 +102,7 @@ do_break_substitution (SCM src)
                            do_break_substitution (scm_vector_ref (src, si))); 
        }
     }
-  else if (ly_pair_p (src)) 
+  else if (is_pair (src)) 
     {
       /*
        UGH! breaks on circular lists.
@@ -111,7 +111,7 @@ do_break_substitution (SCM src)
       SCM oldcdr = ly_cdr (src);
       
       if (newcar == SCM_UNDEFINED
-         && (ly_pair_p (oldcdr) || oldcdr == SCM_EOL))
+         && (is_pair (oldcdr) || oldcdr == SCM_EOL))
        {
          /*
            This is tail-recursion, ie. 
@@ -142,7 +142,7 @@ substitute_grob_list (SCM grob_list)
   SCM l = SCM_EOL;
   SCM * tail = &l;
 
-  for (SCM s = grob_list; ly_pair_p (s); s =  ly_cdr (s))
+  for (SCM s = grob_list; is_pair (s); s =  ly_cdr (s))
     {
       SCM n= substitute_grob (unsmob_grob (ly_car (s)));
 
@@ -350,7 +350,7 @@ Spanner::fast_fubstitute_grob_list (SCM sym,
   
   int sp_index = len;
   int it_index = 0;
-  for (SCM s = grob_list; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = grob_list; is_pair (s); s = ly_cdr (s))
     {
       Grob * g = unsmob_grob (ly_car (s));
 
@@ -467,7 +467,7 @@ substitute_mutable_property_alist (SCM alist)
 
   SCM l = SCM_EOL;
   SCM *tail = &l;
-  for (SCM s = alist; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = alist; is_pair (s); s = ly_cdr (s))
     {
       SCM sym = ly_caar (s);
       SCM val = ly_cdar (s);
index aad400136c726346d2a9f23c8bce02782e882c0a..3db792dbe174c3223c7c51a3114bf765d0b822fd 100644 (file)
@@ -86,7 +86,7 @@ Chord_name_engraver::process_music ()
   if (inversion_event)
     {
       SCM oct = inversion_event->get_property ("octavation");
-      if (ly_number_p (oct))
+      if (is_number (oct))
        {
          Pitch *p = unsmob_pitch (inversion_event->get_property ("pitch"));
          int octavation =  ly_scm2int (oct);
@@ -113,8 +113,8 @@ Chord_name_engraver::process_music ()
   chord_name_->set_property ("text", markup);
   announce_grob (chord_name_, notes_[0]->self_scm ());
   SCM s = get_property ("chordChanges");
-  if (to_boolean (s) && ly_pair_p (last_chord_) 
-      && ly_equal_p (chord_as_scm, last_chord_))
+  if (to_boolean (s) && is_pair (last_chord_) 
+      && is_equal (chord_as_scm, last_chord_))
     chord_name_->set_property ("begin-of-line-visible", SCM_BOOL_T);
 
   last_chord_ = chord_as_scm;
index 6131aa1310f5b1e030bc2206e39db3b65cd3592e..40c009f00b516d492d1fb109e0d77489f252af33 100644 (file)
@@ -76,7 +76,7 @@ Clef_engraver::acknowledge_grob (Grob_info info)
   if (item)
     {
       if (Bar_line::has_interface (info.grob_)
-         && ly_string_p (get_property ("clefGlyph")))
+         && is_string (get_property ("clefGlyph")))
        create_clef ();
     } 
 }
@@ -92,11 +92,11 @@ Clef_engraver::create_clef ()
       clef_ = c;
       SCM cpos = get_property ("clefPosition");
 
-      if (ly_number_p (cpos))
+      if (is_number (cpos))
        Staff_symbol_referencer::set_position (clef_, ly_scm2int (cpos));
 
       SCM oct =  get_property ("clefOctavation");
-      if (ly_number_p (oct) && ly_scm2int (oct))
+      if (is_number (oct) && ly_scm2int (oct))
        {
          Item * g = make_item ("OctavateEight");
 
index 70c7a2c5931e19f5776ef16e41c0872db17f9692..27e4788b2bba3b20acf2c112a5da9e2c8dacc355 100644 (file)
@@ -23,7 +23,7 @@ Clef::before_line_breaking (SCM smob)
 
   SCM glyph = s->get_property ("glyph-name");
   
-  if (ly_string_p (glyph))
+  if (is_string (glyph))
     {
       String str = ly_scm2string (glyph);
 
@@ -53,7 +53,7 @@ Clef::print (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   SCM glyph_scm = me->get_property ("glyph-name");
-  if (!ly_string_p (glyph_scm))
+  if (!is_string (glyph_scm))
     return SCM_EOL;
 
   String glyph = String (ly_scm2string (glyph_scm));
index 94cd0e6a68e85429fae8459b803e9adc21673438..52f14cdfba457ac90fcfc9f4fb0ae9ab4ff8b018 100644 (file)
@@ -82,7 +82,7 @@ Cluster_spanner_engraver::process_music ()
     {
       SCM c0scm = get_property ("middleCPosition");
 
-      int c0 =  ly_number_p (c0scm) ? ly_scm2int (c0scm) : 0;
+      int c0 =  is_number (c0scm) ? ly_scm2int (c0scm) : 0;
       int pmax = INT_MIN;
       int pmin = INT_MAX;
       
index 390659c4d1734d00d681725ad6d03213224dca95..77b63cb88460b5f65f26268653503e50f34d9d26 100644 (file)
@@ -41,7 +41,7 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
   SCM shape_scm = me->get_property ("style");
   String shape;
 
-  if (ly_symbol_p (shape_scm))
+  if (is_symbol (shape_scm))
     {
       shape = ly_symbol2string (shape_scm);
     }
@@ -144,7 +144,7 @@ Cluster::print (SCM smob)
   Grob *commonx = left_bound->common_refpoint (right_bound, X_AXIS);
   SCM cols  =me->get_property ("columns");
 
-  if (!ly_pair_p (cols))
+  if (!is_pair (cols))
     {
       me->warning ("junking empty cluster");
       me->suicide ();
@@ -165,7 +165,7 @@ Cluster::print (SCM smob)
     line with the center of the note heads?
     
    */
-  for (SCM s = cols; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = cols; is_pair (s); s = ly_cdr (s))
     {
       Grob * col = unsmob_grob (ly_car (s));
       Interval yext = col->extent (commony, Y_AXIS);
@@ -186,7 +186,7 @@ Cluster::print (SCM smob)
        {
          Spanner * next = orig->broken_intos_[spanner->get_break_index () + 1];
          SCM cols = next->get_property ("columns");
-         if (ly_pair_p (cols))
+         if (is_pair (cols))
            {
              Grob *next_commony = common_refpoint_of_list (cols, next, Y_AXIS);
              Grob * col = unsmob_grob (ly_car (scm_last_pair (cols)));
index 31f77111845cfa72824b2ba4fe2d2d30ce4e6ee7..4f1ceabbd0afcb13ed1d795b78d05aec557e1460 100644 (file)
@@ -127,7 +127,7 @@ Coherent_ligature_engraver::get_set_column (Item *item, Paper_column *column)
       // also for all associated grobs (NoteSpacing, SeparationItem).
       Grob *sl = Staff_symbol_referencer::get_staff_symbol (item);
       for (SCM tail = parent->get_property ("elements");
-          ly_pair_p (tail);
+          is_pair (tail);
           tail = ly_cdr (tail))
        {
          Item *sibling = unsmob_item (ly_car (tail));
index d26a893b5820921b1fd092d7841ce73284845f23..16b9e613750ea60e690874613c29ae929deb07a0 100644 (file)
@@ -245,7 +245,7 @@ Completion_heads_engraver::process_music ()
 
       int pos = pit->steps ();
       SCM c0 = get_property ("middleCPosition");
-      if (ly_number_p (c0))
+      if (is_number (c0))
        pos += ly_scm2int (c0);
 
       note->set_property ("staff-position",   scm_int2num (pos));
index b8d22ffb392b5a3cf4732d2f74b9bf0da94e1037..db674808ab592696f15d5a525632f35c5aad6485 100644 (file)
@@ -104,7 +104,7 @@ Context_def::add_context_mod (SCM mod)
     }
 
   SCM sym = ly_cadr (mod);
-  if (ly_string_p (sym))
+  if (is_string (sym))
     sym = scm_string_to_symbol (sym);
   
   if (ly_symbol2scm ("consists") == tag
@@ -161,7 +161,7 @@ Context_def::get_accepted (SCM user_mod) const
   SCM mods = scm_reverse_x (scm_list_copy (accept_mods_),
                            user_mod);
   SCM acc = SCM_EOL;
-  for (SCM s = mods; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = mods; is_pair (s); s = ly_cdr (s))
     {
       SCM tag = ly_caar (s);
       SCM sym = ly_cadar (s);
@@ -177,12 +177,12 @@ Context_def::get_accepted (SCM user_mod) const
 Link_array<Context_def>
 Context_def::path_to_acceptable_context (SCM type_sym, Music_output_def* odef) const
 {
-  assert (ly_symbol_p (type_sym));
+  assert (is_symbol (type_sym));
   
   SCM accepted = get_accepted (SCM_EOL);
 
   Link_array<Context_def> accepteds;
-  for (SCM s = accepted; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = accepted; is_pair (s); s = ly_cdr (s))
     {
       Context_def *t = unsmob_context_def (odef->find_context_def (ly_car (s)));
       if (!t)
@@ -196,7 +196,7 @@ Context_def::path_to_acceptable_context (SCM type_sym, Music_output_def* odef) c
       /*
        don't check aliases, because \context Staff should not create RhythmicStaff.
       */
-      if (ly_equal_p (accepteds[i]->get_context_name (), type_sym))
+      if (is_equal (accepteds[i]->get_context_name (), type_sym))
        {
          best_result.push (accepteds[i]);
          return best_result;
@@ -239,12 +239,12 @@ Context_def::get_translator_names (SCM user_mod) const
   SCM mods = scm_reverse_x (scm_list_copy (translator_mods_),
                            user_mod);
   
-  for (SCM s = mods; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = mods; is_pair (s); s = ly_cdr (s))
     {
       SCM tag = ly_caar (s);
       SCM arg = ly_cadar (s);
 
-      if (ly_string_p (arg))
+      if (is_string (arg))
        arg = scm_string_to_symbol (arg);
       
       if (ly_symbol2scm ("consists") == tag)
@@ -265,7 +265,7 @@ Context_def::get_translator_names (SCM user_mod) const
 SCM
 filter_performers (SCM l)
 {
-  for (SCM *tail = &l; ly_pair_p (*tail); tail = SCM_CDRLOC (*tail))
+  for (SCM *tail = &l; is_pair (*tail); tail = SCM_CDRLOC (*tail))
     {
       if (dynamic_cast<Performer*> (unsmob_translator (ly_car (*tail))))
        {
@@ -279,7 +279,7 @@ filter_performers (SCM l)
 SCM
 filter_engravers (SCM l)
 {
-  for (SCM *tail = &l; ly_pair_p (*tail) ; tail = SCM_CDRLOC (*tail))
+  for (SCM *tail = &l; is_pair (*tail) ; tail = SCM_CDRLOC (*tail))
     {
       if (dynamic_cast<Engraver*> (unsmob_translator (ly_car (*tail))))
        {
@@ -364,7 +364,7 @@ Context_def::to_alist () const
   l = scm_cons (scm_cons (ly_symbol2scm ("property-ops"),  property_ops_), l);
   l = scm_cons (scm_cons (ly_symbol2scm ("context-name"),  context_name_), l);
 
-  if (ly_symbol_p (translator_group_type_))
+  if (is_symbol (translator_group_type_))
     l = scm_cons (scm_cons (ly_symbol2scm ("group-type"),  translator_group_type_), l);    
 
   return l;  
index aa914c68a4311ccc1c5b425d3a6669fdf64691f4..0852958727b058b646321557fe8941b8ffee634b 100644 (file)
@@ -33,7 +33,7 @@ LY_DEFINE (ly_context_name, "ly:context-name",
   return unsmob_context_def (tr->definition_)->get_context_name (); 
 }
 
-LY_DEFINE (ly_context_pushpop_property, "ly:context-pushpop-property",
+LY_DEFINE (is_contextushpop_property, "ly:context-pushpop-property",
           3, 1, 0, (SCM context, SCM grob, SCM eltprop, SCM val),
           "Do a single @code{\\override} or @code{\\revert} operation "
           "in @var{context}.  The grob definition @code{grob} is extended "
@@ -42,22 +42,22 @@ LY_DEFINE (ly_context_pushpop_property, "ly:context-pushpop-property",
 {
   Context *tg = unsmob_context (context);
   SCM_ASSERT_TYPE (tg, context, SCM_ARG1, __FUNCTION__, "context");
-  SCM_ASSERT_TYPE (ly_symbol_p (grob), grob, SCM_ARG2, __FUNCTION__, "symbol");
-  SCM_ASSERT_TYPE (ly_symbol_p (eltprop), eltprop, SCM_ARG3, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (grob), grob, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (eltprop), eltprop, SCM_ARG3, __FUNCTION__, "symbol");
 
   execute_pushpop_property (tg, grob, eltprop, val);
 
   return SCM_UNDEFINED;
 }
 
-LY_DEFINE (ly_context_property, "ly:context-property",
+LY_DEFINE (is_contextroperty, "ly:context-property",
           2, 0, 0, (SCM c, SCM name),
          "Return the value of @var{name} from context @var{c}")
 {
   Context *t = unsmob_context (c);
   Context * tr= (t);
   SCM_ASSERT_TYPE (tr, c, SCM_ARG1, __FUNCTION__, "Translator group");
-  SCM_ASSERT_TYPE (ly_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   return tr->internal_get_property (name);
 }
@@ -69,21 +69,21 @@ LY_DEFINE (ly_context_set_property, "ly:context-set-property!",
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  SCM_ASSERT_TYPE (ly_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   tr->internal_set_property (name, val);
 
   return SCM_UNSPECIFIED;
 }
 
-LY_DEFINE (ly_context_property_where_defined, "ly:context-property-where-defined",
+LY_DEFINE (is_contextroperty_where_defined, "ly:context-property-where-defined",
           2, 0, 0, (SCM context, SCM name),
           "Return the context above @var{context} "
           "where @var{name} is defined.")
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  SCM_ASSERT_TYPE (ly_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   tr = tr->where_defined (name);
   if (tr)
@@ -98,13 +98,13 @@ LY_DEFINE (ly_unset_context_property, "ly:context-unset-property", 2, 0, 0,
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  SCM_ASSERT_TYPE (ly_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   tr->unset_property (name);
   return SCM_UNSPECIFIED;
 }
 
-LY_DEFINE (ly_context_parent, "ly:context-parent",
+LY_DEFINE (is_contextarent, "ly:context-parent",
           1, 0, 0, (SCM context),
           "Return the parent of @var{context}, @code{#f} if none.")
 {
@@ -126,7 +126,7 @@ LY_DEFINE (ly_context_find, "ly:context-find",
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "context");
-  SCM_ASSERT_TYPE (ly_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
   
   while (tr)
     {
@@ -142,7 +142,7 @@ LY_DEFINE (ly_context_find, "ly:context-find",
 /*
   What is this used for? Should remove? --hwn
  */
-LY_DEFINE (ly_context_properties, "ly:context-properties",
+LY_DEFINE (is_contextroperties, "ly:context-properties",
           1, 0, 0, (SCM context),
           "Return all properties  of @var{context} in an alist.")
 {
index f5d678115670df50a5f3bef1d1c7b28497c958c9..e6eba727e81c8501c2ecd1382b2a618da3566e2a 100644 (file)
@@ -25,7 +25,7 @@ Context_specced_music_iterator::construct_children ()
 
   String c_id;
   SCM ci = get_music ()->get_property ("context-id");
-  if (ly_string_p (ci))
+  if (is_string (ci))
     c_id = ly_scm2string (ci);
   SCM ops = get_music ()->get_property ("property-operations");
   
index 55aac9bb3a21fcdc59b466d43df5a19366181462..43e919a3927ab6fd7d42f27558f92bd6d2b549b5 100644 (file)
@@ -28,7 +28,7 @@ Context::is_removable () const
 void
 Context::check_removal ()
 {
-  for (SCM p = context_list_; ly_pair_p (p); p = ly_cdr (p))
+  for (SCM p = context_list_; is_pair (p); p = ly_cdr (p))
     {
       Context *trg =  unsmob_context (ly_car (p));
 
@@ -102,7 +102,7 @@ Context::find_context_below (SCM n, String id)
     return this;
 
   Context* r = 0;
-  for (SCM p = context_list_; !r && ly_pair_p (p); p = ly_cdr (p))
+  for (SCM p = context_list_; !r && is_pair (p); p = ly_cdr (p))
     {
       Context *  t = unsmob_context (ly_car (p));
       
@@ -191,7 +191,7 @@ Context::find_create_context (SCM n, String id,
 SCM
 default_child_context_name (Context const *tg)
 {
-  return ly_pair_p (tg->accepts_list_)
+  return is_pair (tg->accepts_list_)
     ? ly_car (scm_last_pair (tg->accepts_list_))
     : SCM_EOL;
 }
@@ -200,7 +200,7 @@ default_child_context_name (Context const *tg)
 bool
 Context::is_bottom_context () const
 {
-  return !ly_symbol_p (default_child_context_name (this));
+  return !is_symbol (default_child_context_name (this));
 }
 
 Context*
@@ -261,7 +261,7 @@ bool
 Context::is_alias (SCM sym) const
 {
   if (sym == ly_symbol2scm ("Bottom")
-      && !ly_pair_p (accepts_list_))
+      && !is_pair (accepts_list_))
     return true;
   if (sym == unsmob_context_def (definition_)->get_context_name ())
     return true;
@@ -325,7 +325,7 @@ find_context_below (Context * where,
   
   Context * found = 0;
   for (SCM s = where->context_list_;
-       !found && ly_pair_p (s); s = ly_cdr (s))
+       !found && is_pair (s); s = ly_cdr (s))
     {
       Context * tr = unsmob_context (ly_car (s));
 
index 2b22ce5c6ab94dd371245b369285762ab7f335d9..f96daf267dd4803da601df381a2de6380fcc8cf1 100644 (file)
@@ -97,7 +97,7 @@ Custos_engraver::acknowledge_grob (Grob_info info)
 void
 Custos_engraver::process_acknowledged_grobs ()
 {
-  if (ly_string_p (get_property ("whichBar")))
+  if (is_string (get_property ("whichBar")))
     custos_permitted = true;
   
   if (custos_permitted)
@@ -108,7 +108,7 @@ Custos_engraver::process_acknowledged_grobs ()
 
          int p = pitches_[i].steps ();
          SCM c0 = get_property ("middleCPosition");
-         if (ly_number_p (c0))
+         if (is_number (c0))
            p += ly_scm2int (c0);
 
          
index 20815715bf9f6d386bcf51e67f2bafea4864f137..1a4dcbb2d63643dda51146280c61a018a483f7ea 100644 (file)
@@ -34,7 +34,7 @@ Custos::print (SCM smob)
 
   SCM scm_style = me->get_property ("style");
   String style;
-  if (ly_symbol_p (scm_style))
+  if (is_symbol (scm_style))
     {
       style = ly_symbol2string (scm_style);
     }
index 24ecb4aa4cc0cc4523ab43bd7af1407de2a2ca86..d4ccf97b59c93a3cd98c7d3601842f0684fdcfd3 100644 (file)
@@ -24,7 +24,7 @@ Dots::print (SCM d)
   
   SCM c = sc->get_property ("dot-count");
 
-  if (ly_number_p (c))
+  if (is_number (c))
     {
       Stencil d = Font_interface::get_default_font (sc)->find_by_name (String ("dots-dot"));
       Real dw = d.extent (X_AXIS).length ();
index 528e07624ad6284f4621ddcd4397b0b0151c1d4c..3663ab0c414e7deb2dada55d53ae2fe7fcf89d94 100644 (file)
@@ -90,7 +90,7 @@ Drum_notes_engraver::process_music ()
       if (scm_hash_table_p (tab) == SCM_BOOL_T)
        defn = scm_hashq_ref (tab, drum_type, SCM_EOL);
       
-      if (ly_pair_p (defn))
+      if (is_pair (defn))
        {
          SCM pos = ly_caddr (defn);
          SCM style =ly_car (defn);
@@ -98,10 +98,10 @@ Drum_notes_engraver::process_music ()
          
          if (scm_integer_p (pos) == SCM_BOOL_T)
            note->set_property ("staff-position", pos);
-         if (ly_symbol_p (style))
+         if (is_symbol (style))
            note->set_property ("style", style);
 
-         if (ly_string_p (script))
+         if (is_string (script))
            {
              Item *p  = make_item ("Script");
              SCM desc  = SCM_EOL;
index 50b8c3f9774b4892febb4eff48bdfed2b8de2a1c..5e5b01d4f4d67d69476e9fd64ad4058f1f0ee11d 100644 (file)
@@ -39,7 +39,7 @@ Drum_note_performer::create_audio_elements ()
       SCM sym = n->get_property ("drum-type");
       SCM defn = SCM_EOL;
 
-      if (ly_symbol_p (sym)
+      if (is_symbol (sym)
          &&  (scm_hash_table_p (tab) == SCM_BOOL_T))
        defn = scm_hashq_ref (tab, sym, SCM_EOL);
       
index 876bfbe5c3997fa69737faa9eb5bd6f6a8f29bfd..b1e2d7e7466a02157393f0ab142e34ffb2e7c840 100644 (file)
@@ -172,7 +172,7 @@ LY_DEFINE (make_duration, "ly:make-duration",
   bool compress = false;
   if (num != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_number_p (num), length, SCM_ARG3, __FUNCTION__, "integer");
+      SCM_ASSERT_TYPE (is_number (num), length, SCM_ARG3, __FUNCTION__, "integer");
       compress = true;
     }
   else
@@ -180,7 +180,7 @@ LY_DEFINE (make_duration, "ly:make-duration",
 
   if (den != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_number_p (den), length, SCM_ARG4, __FUNCTION__, "integer");
+      SCM_ASSERT_TYPE (is_number (den), length, SCM_ARG4, __FUNCTION__, "integer");
       compress = true;
     }
   else
@@ -214,7 +214,7 @@ LY_DEFINE (ly_intlog2, "ly:intlog2",
           1, 0, 0, (SCM d),
          "The 2-logarithm of 1/@var{d}.")
 {
-  SCM_ASSERT_TYPE (ly_number_p (d), d, SCM_ARG1, __FUNCTION__, "integer");
+  SCM_ASSERT_TYPE (is_number (d), d, SCM_ARG1, __FUNCTION__, "integer");
   int log = intlog2 (ly_scm2int (d));
   return scm_int2num (log);
 }
index 1e0f8768e7f2fca5c2516972bf736757483b7945..3e947e36f2b06d8c0238bdb536c6f6ae7e20de34 100644 (file)
@@ -220,7 +220,7 @@ Dynamic_engraver::process_music ()
            start_type = "crescendo";
          
          SCM s = get_property ((start_type + "Spanner").to_str0 ());
-         if (!ly_symbol_p (s) || s == ly_symbol2scm ("hairpin"))
+         if (!is_symbol (s) || s == ly_symbol2scm ("hairpin"))
            {
              cresc_  = make_spanner ("Hairpin");
              cresc_->set_property ("grow-direction",
@@ -245,7 +245,7 @@ Dynamic_engraver::process_music ()
              /*
                FIXME: use get_markup () to check type.
              */
-             if (ly_string_p (s) || ly_pair_p (s))
+             if (is_string (s) || is_pair (s))
                {
                  cresc_->set_property ("edge-text",
                                             scm_cons (s, scm_makfrom0str ("")));
@@ -400,7 +400,7 @@ Dynamic_engraver::acknowledge_grob (Grob_info i)
       if (script_ && !script_->get_parent (X_AXIS))
        {
          SCM head = scm_last_pair (i.grob_->get_property ("note-heads"));
-         if (ly_pair_p (head))
+         if (is_pair (head))
            script_->set_parent (unsmob_grob (ly_car (head)),  X_AXIS);
        }
       
@@ -414,7 +414,7 @@ Dynamic_engraver::acknowledge_grob (Grob_info i)
 
        DynamicText doesn't really have a script-priority field.
        */
-      if (ly_number_p (p)
+      if (is_number (p)
          && ly_scm2int (p) < ly_scm2int (script_->get_property ("script-priority")))
        {
          Side_position_interface::add_support (line_spanner_, i.grob_);
index 4505dbd024a1ce15e785b2a7da9d57235ea42f4d..3410543f4c34701c13b43cd97dfdb7203c571efc 100644 (file)
@@ -46,7 +46,7 @@ Dynamic_performer::create_audio_elements ()
       SCM proc = get_property ("dynamicAbsoluteVolumeFunction");
 
       SCM svolume  = SCM_EOL;
-      if (ly_procedure_p (proc))
+      if (is_procedure (proc))
        {
          // urg
          svolume = scm_call_1 (proc, script_req_->get_property ("text"));
@@ -59,12 +59,12 @@ Dynamic_performer::create_audio_elements ()
        */
       SCM min = get_property ("midiMinimumVolume");
       SCM max = get_property ("midiMaximumVolume");
-      if (ly_number_p (min) || ly_number_p (max))
+      if (is_number (min) || is_number (max))
        {
          Interval iv (0, 1);
-         if (ly_number_p (min))
+         if (is_number (min))
            iv[MIN] = ly_scm2double (min);
-         if (ly_number_p (max))
+         if (is_number (max))
            iv[MAX] = ly_scm2double (max);
          volume = iv[MIN] + iv.length () * volume;
        }
@@ -75,15 +75,15 @@ Dynamic_performer::create_audio_elements ()
          */
          SCM s = get_property ("midiInstrument");
          
-         if (!ly_string_p (s))
+         if (!is_string (s))
            s = get_property ("instrument");
          
-         if (!ly_string_p (s))
+         if (!is_string (s))
            s = scm_makfrom0str ("piano");
          
          
          SCM eq = get_property ("instrumentEqualizer");
-         if (ly_procedure_p (eq))
+         if (is_procedure (eq))
            {
              s = scm_call_1 (eq, s);
            }
index dc51fd495f52acbd7a9e365c0a8a4a5207788c3b..0f30f31e25da0ceb46b127d381c0391e431da487 100644 (file)
@@ -44,7 +44,7 @@ Engraver_group_engraver::acknowledge_grobs ()
       
       SCM meta = info.grob_->internal_get_property (meta_sym);
       SCM nm = scm_assoc (name_sym, meta);
-      if (ly_pair_p (nm))
+      if (is_pair (nm))
        nm = ly_cdr (nm);
       else
        {
@@ -67,7 +67,7 @@ Engraver_group_engraver::acknowledge_grobs ()
          scm_hashq_set_x (tab, nm, acklist);
        }
 
-      for (SCM p = acklist; ly_pair_p (p); p = ly_cdr (p))
+      for (SCM p = acklist; is_pair (p); p = ly_cdr (p))
        {
          Translator * t = unsmob_translator (ly_car (p));
          Engraver * eng = dynamic_cast<Engraver*> (t);
@@ -126,7 +126,7 @@ engraver_valid (Translator*tr, SCM ifaces)
 {
   SCM ack_ifs = scm_assoc (ly_symbol2scm ("interfaces-acked"), tr->translator_description ());
   ack_ifs = ly_cdr (ack_ifs);
-  for (SCM s = ifaces; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = ifaces; is_pair (s); s = ly_cdr (s))
     if (scm_c_memq (ly_car (s), ack_ifs) != SCM_BOOL_F)
       return true;
   return false;
@@ -140,7 +140,7 @@ find_acknowledge_engravers (SCM gravlist, SCM meta_alist)
   SCM ifaces = ly_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta_alist));
 
   SCM l = SCM_EOL;
-  for (SCM s = gravlist; ly_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = gravlist; is_pair (s);  s = ly_cdr (s))
     {
       Translator* tr = unsmob_translator (ly_car (s));
       if (engraver_valid (tr, ifaces))
@@ -168,7 +168,7 @@ recurse_down_engravers (Context * c, Engraver_method ptr, bool context_first)
       (tg->*ptr) ();
     }
 
-  for (SCM s = c->context_list_ ; ly_pair_p (s);
+  for (SCM s = c->context_list_ ; is_pair (s);
        s =ly_cdr (s))
     {
       recurse_down_engravers (unsmob_context (ly_car (s)), ptr, context_first);
@@ -186,7 +186,7 @@ recurse_down_engravers (Context * c, Engraver_method ptr, bool context_first)
 void
 engraver_each (SCM list, Engraver_method method)
 {
-  for (SCM p = list; ly_pair_p (p); p = ly_cdr (p))
+  for (SCM p = list; is_pair (p); p = ly_cdr (p))
     {
       Engraver * e = dynamic_cast<Engraver*>(unsmob_translator (ly_car (p)));
       if (e)
index 4c293aa329d0a5c57ad21bd2ff7f17cbeffb315a..074e2142f09f4e908c7de145f2a1bf827bf9ebcc 100644 (file)
@@ -47,7 +47,7 @@ Event_chord_iterator::process (Moment m)
   if (last_processed_mom_ < Moment (0))
     {
       for (SCM s = dynamic_cast<Music_sequence *> (get_music ())->music_list ();
-          ly_pair_p (s);  s = ly_cdr (s))
+          is_pair (s);  s = ly_cdr (s))
        {
          Music *mus = unsmob_music (ly_car (s));
 
index 8077fec8aef11258bd737610fc8da51366fb1964..baec1ce0d7e5191444ac69db9d73ac2d72714191 100644 (file)
@@ -63,7 +63,7 @@ Event::to_relative_octave (Pitch last)
       new_pit = new_pit.to_relative_octave (last);
 
       SCM check = get_property ("absolute-octave");
-      if (ly_number_p (check) &&
+      if (is_number (check) &&
          new_pit.get_octave () != ly_scm2int (check))
        {
          Pitch expected_pit (ly_scm2int (check),
@@ -142,11 +142,11 @@ LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist",
   SCM newlist = SCM_EOL;
   Pitch *p = unsmob_pitch (pit);
   
-  for (SCM s = l; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = l; is_pair (s); s = ly_cdr (s))
     {
       SCM key = ly_caar (s);
       SCM alter = ly_cdar (s);
-      if (ly_pair_p (key))
+      if (is_pair (key))
        {
          Pitch orig (ly_scm2int (ly_car (key)),
                      ly_scm2int (ly_cdr (key)),
@@ -160,7 +160,7 @@ LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist",
          newlist = scm_cons (scm_cons (key, scm_int2num (orig.get_alteration ())),
                             newlist);
        }
-      else if (ly_number_p (key))
+      else if (is_number (key))
        {
          Pitch orig (0, ly_scm2int (key), ly_scm2int (alter));
          orig = orig.transposed (*p);
@@ -188,14 +188,14 @@ bool
 alist_equal_p (SCM a, SCM b)
 {
   for (SCM s = a;
-       ly_pair_p (s); s = ly_cdr (s))
+       is_pair (s); s = ly_cdr (s))
     {
       SCM key = ly_caar (s);
       SCM val = ly_cdar (s);
       SCM l = scm_assoc (key, b);
 
       if (l == SCM_BOOL_F
-         || !ly_equal_p ( ly_cdr (l), val))
+         || !is_equal ( ly_cdr (l), val))
 
        return false;
     }
index cc2939a030fd151c96b6da39fd58acb3cacc9e36..67388c0c141abfeb9ecbf03be90d43441f696cef 100644 (file)
@@ -121,7 +121,7 @@ completize_extender (Spanner* sp)
   if (!sp->get_bound (RIGHT))
     {
       SCM heads = sp->get_property ("heads");
-      if (ly_pair_p (heads))
+      if (is_pair (heads))
        {
          Item* it = dynamic_cast<Item*> (unsmob_grob (ly_car (heads)));
          if (it)
index 8b2b364df93639e3019fad7dcf642ee3e495f547..62c761bfa0e1f632b56ab51b9689aaf4a765dbd1 100644 (file)
@@ -75,7 +75,7 @@ Figured_bass_engraver::process_music ()
   else if (figures_.size ())
     {
       SCM proc = get_property ("bassFigureFormatFunction");
-      if (ly_procedure_p (proc)) 
+      if (is_procedure (proc)) 
        {
          SCM l = SCM_EOL;
          SCM * t = &l;
index a536f77390d7bfd61a1decad32bf2bf00e5a3b06..3b4b9dc6fb86aca51994d9389a65050eba2f6e1a 100644 (file)
@@ -105,7 +105,7 @@ Fingering_engraver::make_script (Direction d, Music *r, int i)
   // Hmm
   int priority = 200;
   SCM s = fingering->get_property ("script-priority");
-  if (ly_number_p (s))
+  if (is_number (s))
     priority = ly_scm2int (s);
   
   /* See script-engraver.cc */
index 07afa3076bc76d44d1105ae0c033eedd13942895..81bf4e3dcd7d1f71c787c9cda303b34cd5c2b553 100644 (file)
@@ -139,7 +139,7 @@ LY_DEFINE (ly_find_glyph_by_name, "ly:find-glyph-by-name",
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  SCM_ASSERT_TYPE (ly_string_p (name), name, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (is_string (name), name, SCM_ARG2, __FUNCTION__, "string");
 
   Stencil m = fm->find_by_name (ly_scm2string (name));
 
@@ -155,7 +155,7 @@ LY_DEFINE (ly_get_glyph, "ly:get-glyph",
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  SCM_ASSERT_TYPE (ly_number_p (index), index, SCM_ARG2, __FUNCTION__, "number");
+  SCM_ASSERT_TYPE (is_number (index), index, SCM_ARG2, __FUNCTION__, "number");
 
   return fm->get_ascii_char_stencil (ly_scm2int (index)).smobbed_copy ();
 }
@@ -171,7 +171,7 @@ LY_DEFINE (ly_text_dimension,"ly:text-dimension",
   Modified_font_metric*fm = dynamic_cast<Modified_font_metric*>
     (unsmob_metrics (font));
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "modified font metric");
-  SCM_ASSERT_TYPE (ly_string_p (text), text, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (is_string (text), text, SCM_ARG2, __FUNCTION__, "string");
   
   b = fm->text_dimension (ly_scm2string (text));
   
index 17b2e0cb2bf76f2aa0335b44680f2f38ae98339a..1e6ca35bb1940b520a02e123a60edc1a7f391a18 100644 (file)
@@ -51,7 +51,7 @@ wild_compare (SCM field_val, SCM val)
  */
 Font_metric*
 get_font_by_design_size (Paper_def* paper, Real requested,
-                        SCM font_vector)
+                        SCM font_vector, SCM input_encoding_name)
 {
   int n = SCM_VECTOR_LENGTH (font_vector);
   Real size = 1e6;
@@ -83,17 +83,17 @@ get_font_by_design_size (Paper_def* paper, Real requested,
     }
 
   Font_metric *fm = unsmob_metrics (scm_force (SCM_VECTOR_REF (font_vector, i)));
-  return paper->find_scaled_font (fm, requested / size);
+  return paper->find_scaled_font (fm, requested / size, input_encoding_name);
 }
 
 
 Font_metric*
 get_font_by_mag_step (Paper_def* paper, Real requested_step,
-                     SCM font_vector, Real default_size)
+                     SCM font_vector, Real default_size, SCM input_encoding_name)
 {
   return get_font_by_design_size (paper,
                                  default_size * pow (2.0, requested_step / 6.0),
-                                 font_vector);
+                                 font_vector, input_encoding_name);
 }
 
 
@@ -106,11 +106,11 @@ properties_to_font_size_family (SCM fonts, SCM alist_chain)
 
 
 Font_metric *
-select_font (Paper_def *paper, SCM chain)
+select_encoded_font (Paper_def *paper, SCM chain, SCM encoding_name)
 {
   SCM name = ly_assoc_chain (ly_symbol2scm  ("font-name"), chain);
   
-  if (!ly_pair_p (name) || !ly_string_p (ly_cdr (name)))
+  if (!is_pair (name) || !is_string (ly_cdr (name)))
     {
       SCM fonts = paper->lookup_variable (ly_symbol2scm ("fonts"));
       name = properties_to_font_size_family (fonts, chain);
@@ -118,17 +118,16 @@ select_font (Paper_def *paper, SCM chain)
   else
     name  = ly_cdr (name);
 
-
-  if (ly_string_p (name))
+  if (is_string (name))
     {
       SCM mag = ly_assoc_chain (ly_symbol2scm ("font-magnification"), chain);
   
-      Real rmag = ly_pair_p (mag) ? robust_scm2double (ly_cdr (mag), 1.0) : 1;
+      Real rmag = is_pair (mag) ? robust_scm2double (ly_cdr (mag), 1.0) : 1;
 
       Font_metric * fm = all_fonts_global->find_font (ly_scm2string (name));
       
       
-      return paper->find_scaled_font (fm, rmag);
+      return paper->find_scaled_font (fm, rmag, encoding_name);
     }
   else if (scm_instance_p (name))
     {
@@ -137,11 +136,11 @@ select_font (Paper_def *paper, SCM chain)
       
       SCM font_size = ly_assoc_chain (ly_symbol2scm ("font-size"), chain);
       Real req = 0.0;
-      if (ly_pair_p (font_size))
+      if (is_pair (font_size))
        req = ly_scm2double (ly_cdr (font_size));
 
       return get_font_by_mag_step (paper, req,
-                                  vec, ly_scm2double (base_size));
+                                  vec, ly_scm2double (base_size), encoding_name);
     }
 
   assert (0);
@@ -150,3 +149,9 @@ select_font (Paper_def *paper, SCM chain)
 }
 
 
+
+Font_metric *
+select_font (Paper_def *paper, SCM chain)
+{
+  return select_encoded_font (paper, chain, SCM_EOL);
+}
index f26b17ce4249b178331fa94853de7827a3bc0b27..659dba6630d39d517490732360d70b6b32b35ebc 100644 (file)
@@ -36,7 +36,7 @@ Font_size_engraver::acknowledge_grob (Grob_info gi)
   if (gi.origin_trans_->daddy_context_ != daddy_context_)
     return ;
   
-  if (ly_number_p (sz) && ly_scm2double (sz))
+  if (is_number (sz) && ly_scm2double (sz))
     {
       Real font_size = ly_scm2double (sz);
       
index 492a35e4f79f560a2c4abaed2583ebd9a6fed405..20714ec9590fbbf860b118045c844c3c1de1e023 100644 (file)
@@ -21,11 +21,11 @@ Forbid_line_break_engraver::start_translation_timestep ()
   SCM busy = get_property ("busyGrobs");
 
   Moment now = now_mom ();
-  while (ly_pair_p (busy) && unsmob_moment (ly_caar (busy))->main_part_ == now.main_part_)
+  while (is_pair (busy) && unsmob_moment (ly_caar (busy))->main_part_ == now.main_part_)
     busy = ly_cdr (busy);
 
   
-  while (ly_pair_p (busy))
+  while (is_pair (busy))
     {
       Grob *g = unsmob_grob (ly_cdar (busy));
       if (Rhythmic_head::has_interface (g))
index 13f387c46db48409f05b56ee3a78160104a248ca..6454c3998916e15bcbc26a03561e85f3254f562d 100644 (file)
@@ -23,7 +23,7 @@ void ly_add_function_documentation (SCM func,
   if (!strlen (doc))
     return ; 
     
-  if (!ly_vector_p (doc_hash_table ))
+  if (!is_vector (doc_hash_table ))
     doc_hash_table = scm_make_vector (scm_int2num (59), SCM_EOL);
 
   String s = String (" - ") + "LilyPond procedure: " + fname + " " + varlist
index 41b073d541c3bde7d1a7ae27ecc693323ee000d7..2059cecba2a2bf0fe15c9cc405eb4646e4f6f371 100644 (file)
@@ -81,7 +81,7 @@ Global_context::now_mom () const
 Score_context*
 Global_context::get_score_context () const
 {
-  return (ly_pair_p (context_list_))
+  return (is_pair (context_list_))
     ? dynamic_cast<Score_context*> (unsmob_context (ly_car (context_list_)))
     : 0;
 }
@@ -166,7 +166,7 @@ Global_context::apply_finalizations ()
 {
   SCM lst = get_property ("finalizations");
   set_property ("finalizations" , SCM_EOL); 
-  for (SCM s = lst ; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = lst ; is_pair (s); s = ly_cdr (s))
     {
       scm_primitive_eval (ly_car (s)); // TODO: make safe.
     }
index 32839d2433e1233455f0f81754eea5068f840c15..c40047173944a8e47bad490901eed8b2e68a41a7 100644 (file)
@@ -233,7 +233,7 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev,
   if (pc->original_)
     {
       SCM pen = pc->get_property ("penalty");
-      if (ly_number_p (pen) && fabs (ly_scm2double (pen)) < 10000)
+      if (is_number (pen) && fabs (ly_scm2double (pen)) < 10000)
        {
          break_penalties += ly_scm2double (pen);
        }
index b1f163d807c273a987584af01ec6c9f57ef454c3..58706d5b74d47b78dc1ea22918930440291d2fca 100644 (file)
@@ -29,10 +29,10 @@ void add_interface (const char * symbol,
 LY_DEFINE (ly_add_interface, "ly:add-interface", 3,0,0, (SCM a, SCM b, SCM c),
          "Add an interface description.")
 {
-  SCM_ASSERT_TYPE (ly_symbol_p (a), a, SCM_ARG1, __FUNCTION__, "symbol");
-  SCM_ASSERT_TYPE (ly_string_p (b), b, SCM_ARG2, __FUNCTION__, "string");  
-  SCM_ASSERT_TYPE (ly_list_p (c), c, SCM_ARG3, __FUNCTION__, "list of syms");    
-  if (!ly_vector_p (all_ifaces))
+  SCM_ASSERT_TYPE (is_symbol (a), a, SCM_ARG1, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_string (b), b, SCM_ARG2, __FUNCTION__, "string");  
+  SCM_ASSERT_TYPE (is_list (c), c, SCM_ARG3, __FUNCTION__, "list of syms");    
+  if (!is_vector (all_ifaces))
     all_ifaces = scm_make_vector (scm_int2num (40), SCM_EOL);
 
   SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
@@ -65,7 +65,7 @@ check_interfaces_for_property (Grob const *me, SCM sym)
   SCM ifs = me->get_property ("interfaces");
 
   bool found = false;
-  for (; !found && ly_pair_p (ifs); ifs =ly_cdr (ifs))
+  for (; !found && is_pair (ifs); ifs =ly_cdr (ifs))
     {
       SCM iface = scm_hashq_ref (all_ifaces , ly_car (ifs), SCM_BOOL_F);
       if (iface == SCM_BOOL_F)
index ec2035303b4d6e63bcf61827e249bf8b2d1774e8..41a3dc3dfe2d350689846e984694305750eb74bc 100644 (file)
@@ -82,7 +82,7 @@ Grob_pq_engraver::stop_translation_timestep ()
   Moment now = now_mom ();
   SCM start_busy = get_property ("busyGrobs");
   SCM busy = start_busy;
-  while (ly_pair_p (busy) && *unsmob_moment (ly_caar (busy)) == now)
+  while (is_pair (busy) && *unsmob_moment (ly_caar (busy)) == now)
     {
       busy = ly_cdr (busy);
     }
@@ -98,7 +98,7 @@ Grob_pq_engraver::start_translation_timestep ()
 
   SCM start_busy = get_property ("busyGrobs");
   SCM busy = start_busy;
-  while (ly_pair_p (busy) && *unsmob_moment (ly_caar (busy)) < now)
+  while (is_pair (busy) && *unsmob_moment (ly_caar (busy)) < now)
     {
       /*
        The grob-pq-engraver is not water tight, and stuff like
index fc24bc184cfd84d25f6380667c531812335e2ee9..5b0950c676bc952495004e633b366cac92f877f3 100644 (file)
@@ -92,7 +92,7 @@ Grob::internal_get_property (SCM sym) const
 
   s = scm_sloppy_assq (sym, immutable_property_alist_);
   
-  if (internal_type_checking_global_b && ly_pair_p (s))
+  if (internal_type_checking_global_b && is_pair (s))
     {
       if (!type_check_assignment (sym, ly_cdr (s),
                                  ly_symbol2scm ("backend-type?")))
index 738e68a15c684c6cdbff9a8bfd27b5a485c195d3..38d3d1da94dbf3d136d426420445c50df18a4efd 100644 (file)
@@ -21,7 +21,7 @@ LY_DEFINE (ly_grob_set_property,"ly:grob-set-property!", 3, 0, 0,
 {
   Grob * sc = unsmob_grob (grob);
   SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE (ly_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   if (!type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
     error ("typecheck failed");
@@ -40,7 +40,7 @@ LY_DEFINE (ly_get_property, "ly:grob-property",
 {
   Grob *sc = unsmob_grob (grob);
   SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE (ly_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   return sc->internal_get_property (sym);
 }
@@ -169,14 +169,14 @@ LY_DEFINE (ly_grob_translate_axis_x, "ly:grob-translate-axis!",
 {
   Grob *me = unsmob_grob (g);
   SCM_ASSERT_TYPE (me, g, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE (ly_number_p (d), d, SCM_ARG2, __FUNCTION__, "dimension");
+  SCM_ASSERT_TYPE (is_number (d), d, SCM_ARG2, __FUNCTION__, "dimension");
   SCM_ASSERT_TYPE (is_axis (a), a, SCM_ARG3, __FUNCTION__, "axis");
 
   me->translate_axis (ly_scm2double (d), Axis (ly_scm2int (a)));
   return SCM_UNDEFINED;
 }
 
-LY_DEFINE (ly_spanner_p, "ly:spanner?",
+LY_DEFINE (is_spanner, "ly:spanner?",
           1, 0, 0, (SCM g),
           "Is  @var{g} a spanner object?")
 {
@@ -186,7 +186,7 @@ LY_DEFINE (ly_spanner_p, "ly:spanner?",
   return ly_bool2scm (b);
 }
 
-LY_DEFINE (ly_item_p, "ly:item?",
+LY_DEFINE (is_item, "ly:item?",
           1, 0, 0, (SCM g),
           "Is @var{g} an @code{Item} object?")
 {
index 12d29d7b8c28b690233523dc440621290c96837f..b389ce48c004584c3920c5c69bb162a2f8d5444e 100644 (file)
@@ -65,7 +65,7 @@ Grob::Grob (SCM basicprops)
 #endif
   
   SCM meta = get_property ("meta");
-  if (ly_pair_p (meta))
+  if (is_pair (meta))
     {
       SCM ifs = scm_assoc (ly_symbol2scm ("interfaces"), meta);
 
@@ -112,8 +112,8 @@ Grob::Grob (SCM basicprops)
       if (is_number_pair (xt))
        cb = xt;
       else if (cb != SCM_BOOL_F
-         && !ly_procedure_p (cb) && !ly_pair_p (cb)
-         && ly_procedure_p (get_property ("print-function")))
+         && !is_procedure (cb) && !is_pair (cb)
+         && is_procedure (get_property ("print-function")))
        cb = stencil_extent_proc;
     
       dim_cache_[a].dimension_ = cb;
@@ -186,7 +186,7 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
   
   status_= busy;
 
-  for (SCM d = get_property ("dependencies"); ly_pair_p (d);
+  for (SCM d = get_property ("dependencies"); is_pair (d);
        d = ly_cdr (d))
     {
       unsmob_grob (ly_car (d))
@@ -195,7 +195,7 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
 
   
   SCM proc = internal_get_property (funcname);
-  if (ly_procedure_p (proc))
+  if (is_procedure (proc))
     scm_call_1 (proc, this->self_scm ());
  
   status_= final;
@@ -230,7 +230,7 @@ Grob::get_uncached_stencil ()const
   SCM proc = get_property ("print-function");
 
   SCM  mol = SCM_EOL;
-  if (ly_procedure_p (proc)) 
+  if (is_procedure (proc)) 
     mol = scm_apply_0 (proc, scm_list_n (this->self_scm (), SCM_UNDEFINED));
   
   Stencil *m = unsmob_stencil (mol);
@@ -310,7 +310,7 @@ Grob::handle_broken_dependencies ()
        because some Spanners have enormously long lists in their
        properties.
        */
-      for (SCM s = mutable_property_alist_; ly_pair_p (s);
+      for (SCM s = mutable_property_alist_; is_pair (s);
           s = ly_cdr (s))
        {
          sp->substitute_one_mutable_property (ly_caar (s),
@@ -475,8 +475,8 @@ Grob::get_offset (Axis a) const
 bool
 Grob::is_empty (Axis a)const
 {
-  return ! (ly_pair_p (dim_cache_[a].dimension_) ||
-           ly_procedure_p (dim_cache_[a].dimension_));
+  return ! (is_pair (dim_cache_[a].dimension_) ||
+           is_procedure (dim_cache_[a].dimension_));
 }
 
 Interval
@@ -487,9 +487,9 @@ Grob::extent (Grob * refp, Axis a) const
   
   Dimension_cache * d = (Dimension_cache *)&dim_cache_[a];
   Interval ext ;   
-  if (ly_pair_p (d->dimension_))
+  if (is_pair (d->dimension_))
     ;
-  else if (ly_procedure_p (d->dimension_))
+  else if (is_procedure (d->dimension_))
     {
       /*
        FIXME: add doco on types, and should typecheck maybe? 
@@ -499,7 +499,7 @@ Grob::extent (Grob * refp, Axis a) const
   else
     return ext;
 
-  if (!ly_pair_p (d->dimension_))
+  if (!is_pair (d->dimension_))
     return ext;
   
   ext = ly_scm2interval (d->dimension_);
@@ -511,7 +511,7 @@ Grob::extent (Grob * refp, Axis a) const
   /*
     signs ?
    */
-  if (ly_pair_p (extra))
+  if (is_pair (extra))
     {
       ext[BIGGER] +=  ly_scm2double (ly_cdr (extra));
       ext[SMALLER] +=   ly_scm2double (ly_car (extra));
@@ -520,7 +520,7 @@ Grob::extent (Grob * refp, Axis a) const
   extra = get_property (a == X_AXIS
                                ? "minimum-X-extent"
                                : "minimum-Y-extent");
-  if (ly_pair_p (extra))
+  if (is_pair (extra))
     {
       ext.unite (Interval (ly_scm2double (ly_car (extra)),
                           ly_scm2double (ly_cdr (extra))));
@@ -553,7 +553,7 @@ Grob::common_refpoint (Grob const* s, Axis a) const
 Grob *
 common_refpoint_of_list (SCM elist, Grob *common, Axis a) 
 {
-  for (; ly_pair_p (elist); elist = ly_cdr (elist))
+  for (; is_pair (elist); elist = ly_cdr (elist))
     {
       Grob * s = unsmob_grob (ly_car (elist));
       if (!s)
@@ -592,8 +592,8 @@ Grob::name () const
 {
   SCM meta = get_property ("meta");
   SCM nm = scm_assoc (ly_symbol2scm ("name"), meta);
-  nm = (ly_pair_p (nm)) ? ly_cdr (nm) : SCM_EOL;
-  return  ly_symbol_p (nm) ? ly_symbol2string (nm) :  classname (this);  
+  nm = (is_pair (nm)) ? ly_cdr (nm) : SCM_EOL;
+  return  is_symbol (nm) ? ly_symbol2string (nm) :  classname (this);  
 }
 
 void
@@ -773,7 +773,7 @@ ly_scm2grobs (SCM l)
 {
   Link_array<Grob> arr;
 
-  for (SCM s = l; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = l; is_pair (s); s = ly_cdr (s))
     {
       SCM e = ly_car (s);
       arr.push (unsmob_grob (e));
index 78b6a06590f9fe53b77961bf21904585b350f0b5..f49a83566e9e22c82034bbdb18f7ba9fdd638ee7 100644 (file)
@@ -32,7 +32,7 @@ Hara_kiri_group_spanner::consider_suicide (Grob*me)
 {
   Spanner*sp = dynamic_cast<Spanner*> (me);
   SCM worth = me->get_property ("items-worth-living");
-  if (ly_pair_p (worth))
+  if (is_pair (worth))
     return ;
 
   if (!to_boolean (me->get_property ("remove-first"))
index f0d349a5fe2393c60fabd583e98859044dde00b9..9e87e8ecb1559f7c7816039159c5aa85929dc626 100644 (file)
@@ -73,7 +73,7 @@ completize_hyphen (Spanner* sp)
   if (!sp->get_bound (RIGHT))
     {
       SCM heads = sp->get_property ("heads");
-      if (ly_pair_p (heads))
+      if (is_pair (heads))
        {
          Item* it = dynamic_cast<Item*> (unsmob_grob (ly_car (heads)));
          if (it)
index e7d69d4e181b9d683703c056b1049197350b7757..9dda6fc5b26faacbe199e5a6a050d7a20f507897 100644 (file)
@@ -42,7 +42,7 @@ Pointer_group_interface__extract_grobs (Grob const *elt, T *, const char* name)
 {
   Link_array<T> arr;
 
-  for (SCM s = elt->get_property (name); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = elt->get_property (name); is_pair (s); s = ly_cdr (s))
     {
       SCM e = ly_car (s);
       arr.push (dynamic_cast<T*> (unsmob_grob (e)));
index e5e63ff6775f382df6c909cc9b026cdc2bcce4b7..48563f7d725685a2c9dbb65fd8f545fb1ad5d6b0 100644 (file)
@@ -190,17 +190,17 @@ inline SCM ly_assoc_front_x(SCM alist, SCM key, SCM val)
 {
   return scm_acons(key, val, scm_assoc_remove_x (alist, key));
 }
-inline bool ly_pair_p (SCM x) { return SCM_NFALSEP (scm_pair_p (x)); }
-inline bool ly_symbol_p (SCM x) { return SCM_SYMBOLP (x); }
-inline bool ly_boolean_p (SCM x) { return SCM_BOOLP (x); }
-inline bool ly_char_p (SCM x) { return SCM_CHARP (x); }
-inline bool ly_number_p (SCM x) { return SCM_NUMBERP (x); }
-inline bool ly_string_p (SCM x) { return SCM_STRINGP (x); }
-inline bool ly_vector_p (SCM x) { return SCM_VECTORP (x); }
-inline bool ly_list_p (SCM x) { return SCM_NFALSEP (scm_list_p (x)); }
-inline bool ly_procedure_p (SCM x) { return SCM_NFALSEP (scm_procedure_p (x)); }
-inline bool ly_eq_p (SCM x, SCM y) { return SCM_EQ_P (x, y); }
-inline bool ly_equal_p (SCM x, SCM y) { 
+inline bool is_pair (SCM x) { return SCM_NFALSEP (scm_pair_p (x)); }
+inline bool is_symbol (SCM x) { return SCM_SYMBOLP (x); }
+inline bool is_boolean (SCM x) { return SCM_BOOLP (x); }
+inline bool is_char (SCM x) { return SCM_CHARP (x); }
+inline bool is_number (SCM x) { return SCM_NUMBERP (x); }
+inline bool is_string (SCM x) { return SCM_STRINGP (x); }
+inline bool is_vector (SCM x) { return SCM_VECTORP (x); }
+inline bool is_list (SCM x) { return SCM_NFALSEP (scm_list_p (x)); }
+inline bool is_procedure (SCM x) { return SCM_NFALSEP (scm_procedure_p (x)); }
+inline bool is_eq (SCM x, SCM y) { return SCM_EQ_P (x, y); }
+inline bool is_equal (SCM x, SCM y) { 
   return SCM_NFALSEP (scm_equal_p (x, y)); 
 }
 
index a270341f55c353b8123c506576c7a749ba5c0e03..cf727a1586b309c6222d2d3500a8e1ce8d52dc94 100644 (file)
@@ -19,7 +19,7 @@ SCM ly_module_lookup (SCM module, SCM sym);
 SCM ly_modules_lookup (SCM modules, SCM sym);
 SCM ly_module_symbols (SCM mod);
 void  ly_reexport_module (SCM mod);
-inline bool ly_module_p (SCM x) { return SCM_MODULEP(x); }
+inline bool is_module (SCM x) { return SCM_MODULEP(x); }
 void ly_clear_anonymous_modules ();
 
 
index 7a2c84e73e2467fe9c89af5627d2f1aff6d57f0c..466fa59b3a46704a886ec6ba62bd40354c308447 100644 (file)
@@ -62,13 +62,14 @@ public:
   void reinit ();
   Interval line_dimensions_int (int) const;
   void output_settings (Paper_outputter*) const;
-  Font_metric *find_scaled_font (Font_metric *fm, Real mag);
+  Font_metric *find_scaled_font (Font_metric *fm, Real mag, SCM enc_name);
   Real get_dimension (SCM symbol) const;
   
   friend int yyparse (void*);
 };
 
 Paper_def * unsmob_paper (SCM x);
+Font_metric *select_encoded_font (Paper_def *paper, SCM input_encoding, SCM chain);
 Font_metric *select_font (Paper_def *paper, SCM chain);
 
 #endif /* PAPER_DEF_HH */
index 1ef5255c5d301463222603949702b1280a8bae21..3ae5cda3fb7b0fa84e4d4ac44e83a0d16052fb1c 100644 (file)
@@ -20,6 +20,7 @@ class Text_item
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (interpret_markup, (SCM, SCM, SCM));
+  DECLARE_SCHEME_CALLBACK (interpret_string, (SCM, SCM, SCM, SCM));
   static bool has_interface (Grob*);
   static bool markup_p (SCM) ;
 
index 500cd4386d354b35dbeb569fe20868ad44059204..bd45322c03e6ed37182befcc04188b4cecae7f26 100644 (file)
@@ -60,7 +60,7 @@ LY_DEFINE (ly_set_point_and_click, "ly:set-point-and-click", 1, 0, 0,
 
   scm_module_define (global_lily_module, ly_symbol2scm ("point-and-click"), val);
 
-  store_locations_global_b =ly_procedure_p (val);
+  store_locations_global_b =is_procedure (val);
   return SCM_UNSPECIFIED;
 }
 
index 02ff235935b931d698980901f5913cca64db916c..13635df3d1ddd178e5f499b6466802545549aa31 100644 (file)
@@ -85,7 +85,7 @@ LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 0, (SCM sip, SCM msg),
 {
   Input *ip = unsmob_input (sip);
   SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
-  SCM_ASSERT_TYPE (ly_string_p (msg), msg, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (is_string (msg), msg, SCM_ARG2, __FUNCTION__, "string");
 
   String m = ly_scm2string (msg);
   ip->message (m);
index 1f432bcd7a032e8c7aaeca6dc66cca1f6e7eac3a..c859831f986a1da161c394cf35674507dc1ad228 100644 (file)
@@ -122,7 +122,7 @@ Instrument_name_engraver::process_music ()
     Also create text if barlines in other groups. This allows
     a name to be attached to lyrics or chords. 
    */
-  if (ly_string_p (get_property ("whichBar")))
+  if (is_string (get_property ("whichBar")))
     create_text ();
 }
 
index df6e7068b0d2b0024b6376cd92a9549a769b8e3e..cfaef8ae790399a793c54653b990136f62003c3a 100644 (file)
@@ -153,7 +153,7 @@ Item::handle_prebroken_dependencies ()
     more complicated things.
   */
   SCM vis = get_property ("break-visibility");
-  if (ly_procedure_p (vis))
+  if (is_procedure (vis))
     {
       SCM args = scm_list_n (scm_int2num (break_status_dir ()), SCM_UNDEFINED);
       SCM result = scm_apply_0 (vis, args);
index ca5fc070f8a8bcb42211b3476ce5f965185740c3..5a124921dc3c0718a4ca2ff95741e07076068f04 100644 (file)
@@ -79,7 +79,7 @@ Key_engraver::create_key (bool def)
   if (!def)
     {
       SCM vis = get_property ("explicitKeySignatureVisibility"); 
-      if (ly_procedure_p (vis))
+      if (is_procedure (vis))
        item_->set_property ("break-visibility",vis);
     }
 }      
@@ -117,7 +117,7 @@ Key_engraver::acknowledge_grob (Grob_info info)
        }
     }
   else if (Bar_line::has_interface (info.grob_)
-          && ly_pair_p (get_property ("keySignature")))
+          && is_pair (get_property ("keySignature")))
     {
       create_key (true);
     }
@@ -148,22 +148,22 @@ void
 Key_engraver::read_ev (Music const * r)
 {
   SCM p = r->get_property ("pitch-alist");
-  if (!ly_pair_p (p))
+  if (!is_pair (p))
     return;
 
   SCM n = scm_list_copy (p);
   SCM accs = SCM_EOL;
   for (SCM s = get_property ("keyAccidentalOrder");
-       ly_pair_p (s); s = ly_cdr (s))
+       is_pair (s); s = ly_cdr (s))
     {
-      if (ly_pair_p (scm_member (ly_car (s), n)))
+      if (is_pair (scm_member (ly_car (s), n)))
        {
          accs = scm_cons (ly_car (s), accs);
          n = scm_delete_x (ly_car (s), n);
        }
     }
   
-  for (SCM s = n ; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = n ; is_pair (s); s = ly_cdr (s))
     if (ly_scm2int (ly_cdar (s)))
       accs = scm_cons (ly_car (s), accs);
 
index 7e61027985688908e91823d61f61c92eb27d9d0b..bb2b15db75d51b5a423ef915bfb2718532e1df24 100644 (file)
@@ -56,7 +56,7 @@ const int NATURAL_TOP_PITCH = 4;
 int
 alteration_pos  (SCM what, int alter, int c0p)
 {
-  if (ly_pair_p (what))
+  if (is_pair (what))
     return ly_scm2int (ly_car (what)) * 7 + ly_scm2int (ly_cdr (what)) + c0p;
 
   int p = ly_scm2int (what);
@@ -104,7 +104,7 @@ Key_signature_interface::print (SCM smob)
 
   SCM scm_style = me->get_property ("style");
   String style;
-  if (ly_symbol_p (scm_style))
+  if (is_symbol (scm_style))
     {
       style = ly_symbol2string (scm_style);
     }
@@ -118,7 +118,7 @@ Key_signature_interface::print (SCM smob)
 
   SCM c0s = me->get_property ("c0-position");
   int c0p = 0;
-  if (ly_number_p (c0s))
+  if (is_number (c0s))
     c0p = ly_scm2int (c0s);
 
   /*
@@ -127,7 +127,7 @@ Key_signature_interface::print (SCM smob)
   */
 
   Font_metric *fm = Font_interface::get_default_font (me);
-  for (SCM s = newas; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = newas; is_pair (s); s = ly_cdr (s))
     {
       int alteration = ly_scm2int (ly_cdar (s));
       String font_char =
@@ -163,11 +163,11 @@ Key_signature_interface::print (SCM smob)
       mol.add_at_edge (X_AXIS, LEFT, Lookup::blank (Box (x,y)), 0, 0);
 
       Stencil natural;
-      if (ly_pair_p (old))
+      if (is_pair (old))
        natural=Font_interface::get_default_font (me)->
            find_by_name (String ("accidentals-") + style + String ("0"));
       
-      for (; ly_pair_p (old); old = ly_cdr (old))
+      for (; is_pair (old); old = ly_cdr (old))
         {
          SCM found = scm_assoc (ly_caar (old), newas);
          if (found == SCM_BOOL_F
index a56069e1d2350827a6d97fbcac461f133102cd42..b108346cfa7907db78c7ed159d1eec1a3fdc6454 100644 (file)
@@ -152,7 +152,7 @@ LY_DEFINE (ly_kpathsea_gulp_file, "ly:kpathsea-gulp-file",
           "Read the file @var{name}, and return its contents in a string.  "
           "The file is looked up using the search path and kpathsea.")
 {
-  SCM_ASSERT_TYPE (ly_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
   return scm_makfrom0str
     (kpathsea_gulp_file_to_string (ly_scm2string (name)).to_str0 ());
 }
index f569ef4a7eb1b27807868431010244188f2f2c5b..a5cc4354fc30ec2e9e22317f74a2501e0119a6cf 100644 (file)
@@ -251,7 +251,7 @@ HYPHEN              --
          s = s.left_string (s.length () - 1);
 
        SCM sid = lookup_identifier (s);
-       if (ly_string_p (sid)) {
+       if (is_string (sid)) {
                new_input (ly_scm2string (sid), &global_input_file->sources_);
                yy_pop_state ();
        } else { 
@@ -469,7 +469,7 @@ HYPHEN              --
                String str (YYText () + 1);
                SCM s = lookup_markup_command (str);
 
-               if (ly_pair_p (s) && ly_symbol_p (ly_cdr (s)) ) {
+               if (is_pair (s) && is_symbol (ly_cdr (s)) ) {
                        yylval.scm = ly_car(s);
                        SCM tag = ly_cdr(s);
                        if (tag == ly_symbol2scm("markup0"))
@@ -677,14 +677,14 @@ My_lily_lexer::scan_bare_word (String str)
        SCM sym = ly_symbol2scm (str.to_str0 ());
        if ((YYSTATE == notes) || (YYSTATE == chords)) {
                SCM handle = SCM_BOOL_F;
-               if (ly_pair_p (pitchname_tab_stack_))
+               if (is_pair (pitchname_tab_stack_))
                        handle = scm_hashq_get_handle (ly_car (pitchname_tab_stack_), sym);
                
-               if (ly_pair_p (handle)) {
+               if (is_pair (handle)) {
                        yylval.scm = ly_cdr (handle);
                        if (unsmob_pitch (yylval.scm)) 
                            return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
-                       else if (ly_symbol_p (yylval.scm))
+                       else if (is_symbol (yylval.scm))
                            return DRUM_PITCH;
                }
                else if ((handle = scm_hashq_get_handle (chordmodifier_tab_, sym))!= SCM_BOOL_F)
index 84c2303c55bd02570db151dd7f49474593010bc4..d993c066f394428f7e485e1fb5dbe8bc4a08b695 100644 (file)
@@ -73,7 +73,7 @@ ly_quote_scm (SCM s)
 String
 ly_symbol2string (SCM s)
 {
-  assert (ly_symbol_p (s));
+  assert (is_symbol (s));
   return String ((Byte*)SCM_STRING_CHARS (s), (int) SCM_STRING_LENGTH (s));
 }
 
@@ -107,7 +107,7 @@ LY_DEFINE (ly_gulp_file, "ly:gulp-file",
           "Read the file @var{name}, and return its contents in a string.  "
           "The file is looked up using the search path.")
 {
-  SCM_ASSERT_TYPE (ly_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
   return scm_makfrom0str (gulp_file_to_string (ly_scm2string (name)).to_str0 ());
 }
 
@@ -125,7 +125,7 @@ ly_display_scm (SCM s)
 String
 ly_scm2string (SCM s)
 {
-  assert (ly_string_p (s));
+  assert (is_string (s));
 
   char *p = SCM_STRING_CHARS (s);
   String r (p);
@@ -138,7 +138,7 @@ ly_scm2newstr (SCM str, size_t *lenp)
   char *new_str;
   size_t len;
 
-  SCM_ASSERT_TYPE (ly_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
 
   len = SCM_STRING_LENGTH (str);
   new_str = (char *) malloc ((len + 1) * sizeof (char));
@@ -176,18 +176,18 @@ index_set_cell (SCM s, Direction d, SCM v)
 LY_DEFINE (ly_warning,"ly:warn", 1, 0, 0,
   (SCM str), "Scheme callable function to issue the warning @code{msg}.")
 {
-  SCM_ASSERT_TYPE (ly_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
   progress_indication ("\n");
   warning ("lily-guile: " + ly_scm2string (str));
   return SCM_BOOL_T;
 }
 
-LY_DEFINE (ly_dir_p,  "ly:dir?", 1,0, 0,  (SCM s),
+LY_DEFINE (is_dir,  "ly:dir?", 1,0, 0,  (SCM s),
          "type predicate. A direction is @code{-1}, @code{0} or "
           "@code{1}, where @code{-1} represents "
          "left or down and @code{1} represents right or up.")
 {
-  if (ly_number_p (s))
+  if (is_number (s))
     {
       int i = ly_scm2int (s);
       return (i>= -1 && i <= 1)  ? SCM_BOOL_T : SCM_BOOL_F; 
@@ -198,7 +198,7 @@ LY_DEFINE (ly_dir_p,  "ly:dir?", 1,0, 0,  (SCM s),
 bool
 is_number_pair (SCM p)
 {
-  return ly_pair_p (p) && ly_number_p (ly_car (p)) && ly_number_p (ly_cdr (p));
+  return is_pair (p) && is_number (ly_car (p)) && is_number (ly_cdr (p));
 }
 
 typedef void (*Void_fptr) ();
@@ -245,7 +245,7 @@ unsigned int ly_scm_hash (SCM s)
 bool
 is_direction (SCM s)
 {
-  if (ly_number_p (s))
+  if (is_number (s))
     {
       int i = ly_scm2int (s);
       return i>= -1 && i <= 1; 
@@ -257,7 +257,7 @@ is_direction (SCM s)
 bool
 is_axis (SCM s)
 {
-  if (ly_number_p (s))
+  if (is_number (s))
     {
       int i = ly_scm2int (s);
       return i== 0 || i == 1;
@@ -293,7 +293,7 @@ ly_interval2scm (Drul_array<Real> i)
 bool
 to_boolean (SCM s)
 {
-  return ly_boolean_p (s) && ly_scm2bool (s);
+  return is_boolean (s) && ly_scm2bool (s);
 }
 
 /* Appendable list L: the cdr contains the list, the car the last cons
@@ -335,7 +335,7 @@ LY_DEFINE (ly_number2string, "ly:number->string",
           1, 0, 0, (SCM s),
           "Convert @var{num} to a string without generating many decimals.")
 {
-  SCM_ASSERT_TYPE (ly_number_p (s), s, SCM_ARG1, __FUNCTION__, "number");
+  SCM_ASSERT_TYPE (is_number (s), s, SCM_ARG1, __FUNCTION__, "number");
 
   char str[400];                       // ugh.
 
@@ -396,7 +396,7 @@ LY_DEFINE (ly_unit,  "ly:unit", 0, 0, 0, (),
 
 
 
-LY_DEFINE (ly_dimension_p,  "ly:dimension?", 1, 0, 0, (SCM d),
+LY_DEFINE (is_dimension,  "ly:dimension?", 1, 0, 0, (SCM d),
          "Return @var{d} is a number. Used to distinguish length "
          "variables from normal numbers.")
 {
@@ -417,9 +417,9 @@ ADD_SCM_INIT_FUNC (funcs, init_functions);
 SCM
 ly_deep_copy (SCM src)
 {
-  if (ly_pair_p (src))
+  if (is_pair (src))
     return scm_cons (ly_deep_copy (ly_car (src)), ly_deep_copy (ly_cdr (src)));
-  else if (ly_vector_p (src))
+  else if (is_vector (src))
     {
       int len = SCM_VECTOR_LENGTH (src);
       SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
@@ -438,10 +438,10 @@ ly_deep_copy (SCM src)
 SCM
 ly_assoc_chain (SCM key, SCM achain)
 {
-  if (ly_pair_p (achain))
+  if (is_pair (achain))
     {
       SCM handle = scm_assoc (key, ly_car (achain));
-      if (ly_pair_p (handle))
+      if (is_pair (handle))
        return handle;
       else
        return ly_assoc_chain (key, ly_cdr (achain));
@@ -472,10 +472,10 @@ corresponds to call
 SCM
 ly_assoc_cdr (SCM key, SCM alist)
 {
-  if (ly_pair_p (alist))
+  if (is_pair (alist))
     {
       SCM trykey = ly_caar (alist);
-      if (ly_pair_p (trykey) && to_boolean (scm_equal_p (key, ly_cdr (trykey))))
+      if (is_pair (trykey) && to_boolean (scm_equal_p (key, ly_cdr (trykey))))
        return ly_car (alist);
       else
        return ly_assoc_cdr (key, ly_cdr (alist));
@@ -526,10 +526,10 @@ ly_truncate_list (int k, SCM lst)
     {
       SCM s = lst;
       k--;
-      for (; ly_pair_p (s) && k--; s = ly_cdr (s))
+      for (; is_pair (s) && k--; s = ly_cdr (s))
        ;
 
-      if (ly_pair_p (s))
+      if (is_pair (s))
        scm_set_cdr_x (s, SCM_EOL);
     }
   return lst;
@@ -560,7 +560,7 @@ type_check_assignment (SCM sym, SCM val,  SCM type_symbol)
   if (val == SCM_EOL || val == SCM_BOOL_F)
     return ok;
 
-  if (!ly_symbol_p (sym))
+  if (!is_symbol (sym))
 #if 0
     return false;
 #else
@@ -577,7 +577,7 @@ type_check_assignment (SCM sym, SCM val,  SCM type_symbol)
   
   SCM type = scm_object_property (sym, type_symbol);
 
-  if (type != SCM_EOL && !ly_procedure_p (type))
+  if (type != SCM_EOL && !is_procedure (type))
       {
        warning (_f ("Can't find property type-check for `%s' (%s).",
                     ly_symbol2string (sym).to_str0 (),
@@ -593,7 +593,7 @@ type_check_assignment (SCM sym, SCM val,  SCM type_symbol)
   else
     {
       if (val != SCM_EOL
-         && ly_procedure_p (type)
+         && is_procedure (type)
          && scm_call_1 (type, val) == SCM_BOOL_F)
        {
          SCM errport = scm_current_error_port ();
@@ -625,10 +625,10 @@ SCM
 ly_unique (SCM list)
 {
   SCM unique = SCM_EOL;
-  for (SCM i = list; ly_pair_p (i); i = ly_cdr (i))
+  for (SCM i = list; is_pair (i); i = ly_cdr (i))
     {
-      if (!ly_pair_p (ly_cdr (i))
-         || !ly_equal_p (ly_car (i), ly_cadr (i)))
+      if (!is_pair (ly_cdr (i))
+         || !is_equal (ly_car (i), ly_cadr (i)))
        unique = scm_cons (ly_car (i), unique);
     }
   return scm_reverse_x (unique, SCM_EOL);
@@ -648,11 +648,11 @@ ly_split_list (SCM s, SCM list)
 {
   SCM before = SCM_EOL;
   SCM after = list;
-  for (; ly_pair_p (after);)
+  for (; is_pair (after);)
     {
       SCM i = ly_car (after);
       after = ly_cdr (after);
-      if (ly_equal_p (i, s))
+      if (is_equal (i, s))
        break;
       before = scm_cons (i, before);
     }
@@ -678,7 +678,7 @@ display_list (SCM s)
   SCM p = scm_current_output_port ();
 
   scm_puts ("(", p);
-  for (; ly_pair_p (s); s =ly_cdr (s))
+  for (; is_pair (s); s =ly_cdr (s))
     {
       scm_display (ly_car (s), p);
       scm_puts (" ", p);      
@@ -692,8 +692,8 @@ int_list_to_slice (SCM l)
 {
   Slice s;
   s.set_empty ();
-  for (; ly_pair_p (l); l = ly_cdr (l))
-    if (ly_number_p (ly_car (l)))
+  for (; is_pair (l); l = ly_cdr (l))
+    if (is_number (ly_car (l)))
       s.add_point (ly_scm2int (ly_car (l))); 
   return s;
 }
@@ -705,7 +705,7 @@ int_list_to_slice (SCM l)
 SCM
 robust_list_ref (int i, SCM l)
 {
-  while (i-- > 0 && ly_pair_p (ly_cdr (l)))
+  while (i-- > 0 && is_pair (ly_cdr (l)))
     l = ly_cdr (l);
   return ly_car (l);
 }
@@ -713,7 +713,7 @@ robust_list_ref (int i, SCM l)
 Real
 robust_scm2double (SCM k, double x)
 {
-  if (ly_number_p (k))
+  if (is_number (k))
     x = ly_scm2double (k);
   return x;
 }
@@ -761,7 +761,7 @@ alist_to_hashq (SCM alist)
     return scm_make_vector (scm_int2num (0), SCM_EOL);
          
   SCM tab = scm_make_vector (scm_int2num (i), SCM_EOL);
-  for (SCM s = alist; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = alist; is_pair (s); s = ly_cdr (s))
     {
       SCM pt = ly_cdar (s);
       scm_hashq_set_x (tab, ly_caar (s), pt);
index fe05630ed16ce1f9bb87c18756b1089260a8cb15..cbcf9b02edb4dae613e5c0e1a87e63c42c3e57c2 100644 (file)
@@ -73,7 +73,7 @@ Line_interface::line (Grob *me, Offset from, Offset to)
   SCM type = me->get_property ("style");
 
   SCM dash_fraction = me->get_property ("dash-fraction");
-  if (ly_number_p (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
+  if (is_number (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
     {
       
       Real fraction
index 4c62a01e0d72dc7bf5bb30f71da3dddd55b8d3a7..10c63b9fff24f98bf77d17c46ddf441528ee1c07 100644 (file)
@@ -98,7 +98,7 @@ Line_spanner::line_stencil (Grob *me,
 {
   Offset dz = to -from ; 
   SCM type = me->get_property ("style");
-  if (ly_symbol_p (type)
+  if (is_symbol (type)
       && (type == ly_symbol2scm ("line")
          || type == ly_symbol2scm ("dashed-line")
          || type == ly_symbol2scm ("dotted-line")
@@ -109,7 +109,7 @@ Line_spanner::line_stencil (Grob *me,
        ? zigzag_stencil (me, from, to)
        : Line_interface::line (me, from, to);
     }
-  else if (ly_symbol_p (type)
+  else if (is_symbol (type)
           && type == ly_symbol2scm ("trill"))
     {
       SCM alist_chain = Font_interface::text_font_alist_chain (me);
index 37a3da0b10a2f958143a2cbc91964458a7d94e01..7be702385a3dfb80bf6dd0363cabb6b72946c67c 100644 (file)
@@ -710,8 +710,8 @@ LY_DEFINE (ly_bracket ,"ly:bracket",
 {
   SCM_ASSERT_TYPE (is_axis (a), a, SCM_ARG1, __FUNCTION__, "axis") ;
   SCM_ASSERT_TYPE (is_number_pair (iv), iv, SCM_ARG2, __FUNCTION__, "number pair") ;
-  SCM_ASSERT_TYPE (ly_number_p (t), a, SCM_ARG3, __FUNCTION__, "number") ;
-  SCM_ASSERT_TYPE (ly_number_p (p), a, SCM_ARG4, __FUNCTION__, "number") ;
+  SCM_ASSERT_TYPE (is_number (t), a, SCM_ARG3, __FUNCTION__, "number") ;
+  SCM_ASSERT_TYPE (is_number (p), a, SCM_ARG4, __FUNCTION__, "number") ;
 
 
   return Lookup::bracket ((Axis)ly_scm2int (a), ly_scm2interval (iv),
@@ -732,7 +732,7 @@ LY_DEFINE (ly_filled_box ,"ly:round-filled-box",
 {
   SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG1, __FUNCTION__, "number pair") ;
   SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG2, __FUNCTION__, "number pair") ;
-  SCM_ASSERT_TYPE (ly_number_p (blot), blot, SCM_ARG3, __FUNCTION__, "number") ;
+  SCM_ASSERT_TYPE (is_number (blot), blot, SCM_ARG3, __FUNCTION__, "number") ;
 
   return Lookup::round_filled_box (Box (ly_scm2interval (xext), ly_scm2interval (yext)),
                                   ly_scm2double (blot)).smobbed_copy ();
index 7e22dcf202d720ce87dfc729a85df3d063e96932..a3a5be680f8f63178f04ee7d898f29b080990c81 100644 (file)
@@ -40,7 +40,7 @@ ly_clear_anonymous_modules ()
   SCM s = anon_modules;
   anon_modules = SCM_EOL;
   
-  for (; ly_pair_p (s) ; s = ly_cdr (s))
+  for (; is_pair (s) ; s = ly_cdr (s))
     {
       SCM tab= scm_c_make_hash_table (2);
       /* UGH. */
index b459aac1cc06a84407503582528e0912ea52ad0c..c3fc90d65b3bef59ea92db29d60d4e26c0101de1 100644 (file)
@@ -45,7 +45,7 @@ melisma_busy (Context* tr)
   SCM melisma_properties = tr->get_property ("melismaBusyProperties");
   bool busy = false;
 
-  for (; ly_pair_p (melisma_properties);
+  for (; is_pair (melisma_properties);
        melisma_properties = ly_cdr (melisma_properties))
     busy = busy || to_boolean (tr->internal_get_property (ly_car (melisma_properties)));
 
@@ -128,7 +128,7 @@ Lyric_combine_music_iterator::get_busy_status () const
 
   SCM grobs = tr->get_property ("busyGrobs");
   Moment now = tr->now_mom ();
-  for (; ly_pair_p (grobs); grobs = ly_cdr (grobs))
+  for (; is_pair (grobs); grobs = ly_cdr (grobs))
     {
       SCM grob = ly_cdar (grobs);
       Moment end  =*unsmob_moment (ly_caar (grobs));
index 420677d9047f49b35d1fd098e261d8b47088c13a..c7f9286b4e687cf9732fa17478ef50319b55f3d0 100644 (file)
@@ -25,7 +25,7 @@ Music*
 Lyric_combine_music::get_music () const
 {
   SCM l = get_property ("elements");
-  if (!ly_pair_p (l))
+  if (!is_pair (l))
     return 0;
   return unsmob_music (ly_car (l));
 }
@@ -35,10 +35,10 @@ Music*
 Lyric_combine_music::get_lyrics () const
 {
   SCM l = get_property ("elements");
-  if (!ly_pair_p (l))
+  if (!is_pair (l))
     return 0;
   l = ly_cdr (l);
-  if (!ly_pair_p (l))
+  if (!is_pair (l))
     return 0;
   return unsmob_music (ly_car (l));
 }
index 361d73a9aecbc9c01298d699d65fffa82769219d..9d421bdd50eb70e6c7f987971afb002d6d9e7a1e 100644 (file)
@@ -76,7 +76,7 @@ get_voice_to_lyrics (Context *lyrics)
   SCM voice = lyrics->get_property ("associatedVoice");
   String nm = lyrics->id_string_;
 
-  if (ly_string_p (voice))
+  if (is_string (voice))
     nm = ly_scm2string (voice);
   else
     {
@@ -97,7 +97,7 @@ Grob *
 get_current_note_head (Context * voice)
 {
   for (SCM s = voice->get_property ("busyGrobs");
-       ly_pair_p (s); s = ly_cdr (s))
+       is_pair (s); s = ly_cdr (s))
     {
       Item*g = dynamic_cast<Item*> (unsmob_grob (ly_cdar (s)));
          
index 331c07ca404b7e15d55ef7cddc5ae53df20a0107..3d41c21be6fbdd8c306ac77f99eeb57f0ac5ecb1 100644 (file)
@@ -40,7 +40,7 @@ Lyric_performer::create_audio_elements ()
 {
   // FIXME: won't work with fancy lyrics
   if (lreqs_.size ()
-      && ly_string_p (lreqs_[0]->get_property ("text"))
+      && is_string (lreqs_[0]->get_property ("text"))
       && ly_scm2string (lreqs_[0]->get_property ("text")).length ())
     {
       audio_ = new Audio_text (Audio_text::LYRIC,
index bf537dfbdf56259ee6a7163e90e1890169d48160..a6403a3a3c0ff8c217de381e74fde9b37b01c267 100644 (file)
@@ -113,9 +113,9 @@ Mark_engraver::process_music ()
       SCM m = mark_ev_->get_property ("label");
       SCM proc = get_property ("markFormatter");
       if (!Text_item::markup_p (m) &&
-         ly_procedure_p (proc))
+         is_procedure (proc))
        {
-         if (!ly_number_p (m)) 
+         if (!is_number (m)) 
            m =  get_property ("rehearsalMark");
 
          if (scm_integer_p (m) == SCM_BOOL_T
@@ -127,7 +127,7 @@ Mark_engraver::process_music ()
                                            scm_int2num (mark_count));
            }
 
-         if (ly_number_p (m))
+         if (is_number (m))
            m = scm_call_2 (proc, m, daddy_context_->self_scm ());
          else
            warning ("rehearsalMark does not have integer value.");
index 966fa908b6e3757bcc822cdaf1d9a66bc5b29211..f6d3e5618d8ff107de604d3ee97331c6d4e4c6bc 100644 (file)
@@ -64,7 +64,7 @@ Measure_grouping_engraver::process_music ()
     return; 
   
   SCM grouping = get_property ("beatGrouping");
-  if (ly_pair_p (grouping))
+  if (is_pair (grouping))
     {
       Moment *measpos = unsmob_moment (get_property ("measurePosition"));
       Rational mp = measpos->main_part_;
@@ -73,7 +73,7 @@ Measure_grouping_engraver::process_music ()
       Rational bl = beatlen->main_part_;
        
       Rational where (0);
-      for (SCM s = grouping; ly_pair_p (s);
+      for (SCM s = grouping; is_pair (s);
           where += Rational (ly_scm2int (ly_car (s))) * bl,
           s = ly_cdr (s)
           )
index f4a1202e82577721e50b22bddf7c5d23a175f93b..eae97c7df93dbb44df9c65ed0e70add27c1df6c3 100644 (file)
@@ -136,7 +136,7 @@ Multi_measure_rest_engraver::process_music ()
        = ly_scm2int (get_property ("currentBarNumber"));
     }
 
-  bar_seen_ = ly_string_p (get_property ("whichBar"));
+  bar_seen_ = is_string (get_property ("whichBar"));
 }
 
 void
@@ -263,7 +263,7 @@ Multi_measure_rest_engraver::start_translation_timestep ()
        {
          SCM thres = get_property ("restNumberThreshold");
          int t = 1;
-         if (ly_number_p (thres))
+         if (is_number (thres))
            t = ly_scm2int (thres);
       
          if (num <= t)
index a7625e3c1964295495e292dd0932c6d304ab6db3..056c75d2f0e3062e9d7654478c0a5619c36c4248 100644 (file)
@@ -102,7 +102,7 @@ Multi_measure_rest::print (SCM smob)
 
   int measures = 0;
   SCM m (me->get_property ("measure-count"));
-  if (ly_number_p (m))
+  if (is_number (m))
     {
       measures = ly_scm2int (m);
     }
@@ -118,7 +118,7 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space)
 {
   int measures = 0;
   SCM m (me->get_property ("measure-count"));
-  if (ly_number_p (m))
+  if (is_number (m))
     {
       measures = ly_scm2int (m);
     }
@@ -282,7 +282,7 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
     }
   
   Stencil mol; 
-  for (SCM  s = mols; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM  s = mols; is_pair (s); s = ly_cdr (s))
     {
       mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (ly_car (s)), inner_padding, 0);
     }
index ea8e73434931215bbe4ccb83c4d2dd4886642cef..ce0bf4140e8b0a00b9a78b1ede73431d5fac55a4 100644 (file)
@@ -78,7 +78,7 @@ Music_iterator::get_static_get_iterator (Music *m)
 
   SCM ctor = m->get_property ("iterator-ctor") ;
   SCM iter = SCM_EOL;
-  if (ly_procedure_p (ctor))
+  if (is_procedure (ctor))
     {
       iter = scm_call_0 (ctor);
       p = unsmob_iterator (iter);
index ae3a0be07fdf2049e5b5fbfbd0700391c97dc764..73c2326e73c22a52996eda9038d2c1bc52222ad3 100644 (file)
@@ -43,7 +43,7 @@ Music_output_def::Music_output_def (Music_output_def const &s)
   scm_gc_unprotect_object (translator_tab_->self_scm ());  
   
   scope_= ly_make_anonymous_module ();
-  if (ly_module_p (s.scope_))
+  if (is_module (s.scope_))
     ly_import_module (scope_, s.scope_);
 }
 
@@ -133,7 +133,7 @@ LY_DEFINE (ly_paper_lookup, "ly:paper-lookup",
 {
   Music_output_def *op = unsmob_music_output_def (pap);
   SCM_ASSERT_TYPE (op, pap, SCM_ARG1, __FUNCTION__, "Paper");
-  SCM_ASSERT_TYPE (ly_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   SCM var = ly_module_lookup (op->scope_, sym);
   if (SCM_VARIABLEP (var))
index d56014ab631ebf8350b7bf2552267cb965fbba96..5c033c0a26215579eac70e4465fd7800f6ef4a5a 100644 (file)
@@ -36,7 +36,7 @@ Music_sequence::Music_sequence ( )
 void
 transpose_music_list (SCM l,  Pitch rq)
 {
-  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; is_pair (s);  s = ly_cdr (s))
     unsmob_music (ly_car (s))->transpose (rq);    
 }
 
@@ -46,7 +46,7 @@ Music_sequence::cumulative_length (SCM l)
   Moment cumulative;
   Moment last_len; 
 
-  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; is_pair (s);  s = ly_cdr (s))
     {
       Moment l = unsmob_music (ly_car (s))->get_length ();
       if (last_len.grace_part_ && l.main_part_)
@@ -67,7 +67,7 @@ Moment
 Music_sequence::maximum_length (SCM l)
 {
   Moment dur = 0;
-  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; is_pair (s);  s = ly_cdr (s))
     {
       Music * m = unsmob_music (ly_car (s));
       Moment l = m->get_length ();
@@ -84,7 +84,7 @@ music_list_to_relative (SCM l,Pitch p, bool ret_first)
   int count=0;
 
   Pitch last = p;
-  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; is_pair (s);  s = ly_cdr (s))
     {
       if (Music *m = unsmob_music (ly_car (s)))
        {
@@ -101,7 +101,7 @@ music_list_to_relative (SCM l,Pitch p, bool ret_first)
 void
 compress_music_list (SCM l, Moment m)
 {
-  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; is_pair (s);  s = ly_cdr (s))
     unsmob_music (ly_car (s))->compress (m);
 }
 
@@ -112,7 +112,7 @@ Music_sequence::minimum_start (SCM l)
 {
   Moment m;
   
-  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; is_pair (s);  s = ly_cdr (s))
     {
       m = m <? unsmob_music (ly_car (s))->start_mom ();
     }
@@ -124,7 +124,7 @@ Music_sequence::first_start (SCM l)
 {
   Moment m;
   
-  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; is_pair (s);  s = ly_cdr (s))
     {
       Music * mus = unsmob_music (ly_car (s));
       Moment l = mus->get_length ();
index c760862a6fe85285367a29a617f289c66eafaca8..df6e3d99e5ebc8dc76ac9fb0e3837caba7f2651d 100644 (file)
@@ -28,7 +28,7 @@ String
 Music::name () const
 {
   SCM nm = get_property ("name");
-  if (ly_symbol_p (nm))
+  if (is_symbol (nm))
     {
       return ly_symbol2string (nm);
     }
@@ -87,7 +87,7 @@ Music::get_length () const
   SCM lst = get_property ("length");
   if (unsmob_moment (lst))
     return *unsmob_moment (lst);
-  else if (ly_procedure_p (lst))
+  else if (is_procedure (lst))
     {
       SCM res = scm_call_1 (lst, self_scm ());
       return *unsmob_moment (res);
@@ -100,7 +100,7 @@ Moment
 Music::start_mom () const
 {
   SCM lst = get_property ("start-moment-function");
-  if (ly_procedure_p (lst))
+  if (is_procedure (lst))
     {
       SCM res = scm_call_1 (lst, self_scm ());
       return *unsmob_moment (res);
@@ -114,7 +114,7 @@ void
 print_alist (SCM a, SCM port)
 {
   /* SCM_EOL  -> catch malformed lists.  */
-  for (SCM s = a; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = a; is_pair (s); s = ly_cdr (s))
     {
       scm_display (ly_caar (s), port);
       scm_puts (" = ", port);
@@ -130,7 +130,7 @@ Music::print_smob (SCM s, SCM p, scm_print_state*)
   Music* m = unsmob_music (s);
 
   SCM nm = m->get_property ("name");
-  if (ly_symbol_p (nm) || ly_string_p (nm))
+  if (is_symbol (nm) || is_string (nm))
     scm_display (nm, p);
   else
     scm_puts (classname (m),p);
@@ -231,7 +231,7 @@ LY_DEFINE (ly_music_property,
 {
   Music * sc = unsmob_music (mus);
   SCM_ASSERT_TYPE (sc, mus, SCM_ARG1, __FUNCTION__, "music");
-  SCM_ASSERT_TYPE (ly_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   return sc->internal_get_property (sym);
 }
@@ -242,7 +242,7 @@ LY_DEFINE (ly_music_set_property, "ly:music-set-property!",
 {
   Music * sc = unsmob_music (mus);
   SCM_ASSERT_TYPE (sc, mus, SCM_ARG1, __FUNCTION__, "music");
-  SCM_ASSERT_TYPE (ly_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   bool ok = type_check_assignment (sym, val, ly_symbol2scm ("music-type?"));
   if (ok)
@@ -275,7 +275,7 @@ LY_DEFINE (ly_extended_make_music, "ly:make-bare-music",
          "for creating music objects. "
          )
 {
-  SCM_ASSERT_TYPE (ly_string_p (type), type, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (is_string (type), type, SCM_ARG1, __FUNCTION__, "string");
   SCM s = make_music (ly_scm2string (type))->self_scm ();
   unsmob_music (s)->immutable_property_alist_ = props;
   scm_gc_unprotect_object (s);
@@ -301,7 +301,7 @@ LY_DEFINE (ly_music_list_p,"ly:music-list?",
           "of music objects.")
 {
   if (scm_list_p (lst) == SCM_BOOL_T)
-    while (ly_pair_p (lst))
+    while (is_pair (lst))
       {
        if (!unsmob_music (ly_car (lst)))
          return SCM_BOOL_F;
@@ -321,7 +321,7 @@ LY_DEFINE (ly_deep_mus_copy, "ly:music-deep-copy",
       copy = unsmob_music (m)->clone ()->self_scm ();
       scm_gc_unprotect_object (copy);
     }
-  else if (ly_pair_p (m))
+  else if (is_pair (m))
     copy = scm_cons (ly_deep_mus_copy (ly_car (m)),
                    ly_deep_mus_copy (ly_cdr (m)));
   return copy;
index 242167bf5f26766f26fddcfae89a47c567d22a6b..9cd0942a1ec06ee91a39310ddf4bb4c46d7bcb98 100644 (file)
@@ -118,7 +118,7 @@ My_lily_lexer::add_scope (SCM module)
 {
   ly_reexport_module (scm_current_module ());
   scm_set_current_module (module);
-  for (SCM s = scopes_; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = scopes_; is_pair (s); s = ly_cdr (s))
     {
       /* UGH. how to do this more neatly? */      
       SCM expr
@@ -152,7 +152,7 @@ SCM
 My_lily_lexer::lookup_identifier (String s)
 {
   SCM sym = ly_symbol2scm (s.to_str0());
-  for (SCM s = scopes_; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = scopes_; is_pair (s); s = ly_cdr (s))
     {
       SCM var = ly_module_lookup (ly_car (s), sym);
       if (var != SCM_BOOL_F)
@@ -179,7 +179,7 @@ My_lily_lexer::start_main_input ()
 void
 My_lily_lexer::set_identifier (SCM name, SCM s)
 {
-  assert (ly_string_p (name));
+  assert (is_string (name));
   
   if (lookup_keyword (ly_scm2string (name)) >= 0)
     {
index 412778f801f541fe7847a4fd90640c6486f4dbef..47728ded09ab28a171e33fa23663175dbb62142a 100644 (file)
@@ -132,7 +132,7 @@ My_lily_parser::paper_description ()
 
   SCM al = p->translator_tab_->to_alist ();
   SCM l = SCM_EOL;
-  for (SCM s = al ; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = al ; is_pair (s); s = ly_cdr (s))
     {
       Context_def * td = unsmob_context_def (ly_cdar (s));
       l = scm_cons (scm_cons (ly_caar (s), td->to_alist ()),  l);
index 54ec772291b8ca48b7dd380dc1a2e258993cdc76..f07b72672599d87e5212df5d47390c6144a8389a 100644 (file)
@@ -67,7 +67,7 @@ New_fingering_engraver::acknowledge_grob (Grob_info inf)
 
       SCM arts = note_ev->get_property ("articulations");
 
-      for (SCM s = arts; ly_pair_p (s); s = ly_cdr  (s))
+      for (SCM s = arts; is_pair (s); s = ly_cdr  (s))
        {
          Music * m = unsmob_music (ly_car (s));
 
@@ -304,7 +304,7 @@ New_fingering_engraver::stop_translation_timestep ()
        sc->set_property ("direction-source", stem_->self_scm ());
       
       SCM follow = scm_assoc (ly_symbol2scm ("follow-into-staff"), articulations_[i].description_);
-      if (ly_pair_p (follow) && to_boolean (ly_cdr (follow)))
+      if (is_pair (follow) && to_boolean (ly_cdr (follow)))
        {
          sc->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS);
          sc->set_property ("staff-padding" , SCM_EOL);
index a1a68df85ee37f17181c858a19ebc35f2bb65816..b2f95dde61b04e8f1080129e2ea0b00efef0c4c1 100644 (file)
@@ -160,7 +160,7 @@ New_lyric_combine_music_iterator::find_voice ()
     {
       SCM voice_name = get_music ()->get_property ("associated-context");
   
-      if (ly_string_p (voice_name))
+      if (is_string (voice_name))
        {
          Context *t = get_outlet ();
          while (t && t->daddy_context_)
index c7d8886eb7dbaf895a813d3fefff8421fe6b4a71..1a6d65eff31f3d48bfd841a4af7bf6a72e621ddd 100644 (file)
@@ -74,7 +74,7 @@ check_meshing_chords (Grob *me,
 
 
   /* Do not merge notes typeset in different style. */
-  if ( !ly_equal_p (nu->get_property ("style"),
+  if ( !is_equal (nu->get_property ("style"),
                     nd->get_property ("style") ) )
     merge_possible = false;
   
@@ -302,7 +302,7 @@ Note_collision_interface::do_shifts (Grob* me)
   while (flip (&d) != UP);
   
   Link_array<Grob> done;
-  for (; ly_pair_p (hand); hand =ly_cdr (hand))
+  for (; is_pair (hand); hand =ly_cdr (hand))
     {
       Grob * s = unsmob_grob (ly_caar (hand));
       Real amount = ly_scm2double (ly_cdar (hand));
@@ -310,7 +310,7 @@ Note_collision_interface::do_shifts (Grob* me)
       s->translate_axis (amount *wid, X_AXIS);
       done.push (s);
     }
-  for (; ly_pair_p (autos); autos =ly_cdr (autos))
+  for (; is_pair (autos); autos =ly_cdr (autos))
     {
       Grob * s = unsmob_grob (ly_caar (autos));
       Real amount = ly_scm2double (ly_cdar (autos));
@@ -326,7 +326,7 @@ Note_collision_interface::get_clash_groups (Grob *me)
   Drul_array<Link_array<Grob> > clash_groups;
  
   SCM s = me->get_property ("elements");
-  for (; ly_pair_p (s); s = ly_cdr (s))
+  for (; is_pair (s); s = ly_cdr (s))
     {
       SCM car = ly_car (s);
 
@@ -371,7 +371,7 @@ Note_collision_interface::automatic_shift (Grob *me,
          SCM sh
            = clashes[i]->get_property ("horizontal-shift");
 
-         if (ly_number_p (sh))
+         if (is_number (sh))
            shift.push (ly_scm2int (sh));
          else
            shift.push (0);
@@ -452,12 +452,12 @@ Note_collision_interface::forced_shift (Grob *me)
   SCM tups = SCM_EOL;
   
   SCM s = me->get_property ("elements");
-  for (; ly_pair_p (s); s = ly_cdr (s))
+  for (; is_pair (s); s = ly_cdr (s))
     {
       Grob * se = unsmob_grob (ly_car (s));
 
       SCM force =  se->get_property ("force-hshift");
-      if (ly_number_p (force))
+      if (is_number (force))
        {
          tups = scm_cons (scm_cons (se->self_scm (), force),
                          tups);
index b4a0efa6d9d7ec54132d7edfd3b182d93da5e813..cf3ea20be61ac2084a58894c3520240f889a8d33 100644 (file)
@@ -35,8 +35,8 @@ Note_column::shift_compare (Grob *const &p1, Grob *const&p2)
   SCM s1 = p1->get_property ("horizontal-shift");
   SCM s2 = p2->get_property ("horizontal-shift");
 
-  int h1 = (ly_number_p (s1))?  ly_scm2int (s1) :0;
-  int h2 = (ly_number_p (s2)) ? ly_scm2int (s2):0;
+  int h1 = (is_number (s1))?  ly_scm2int (s1) :0;
+  int h2 = (is_number (s2)) ? ly_scm2int (s2):0;
   return h1 - h2;
 }
 
@@ -55,7 +55,7 @@ Note_column::head_positions_interval (Grob *me)
   iv.set_empty ();
 
   SCM h = me->get_property ("note-heads");
-  for (; ly_pair_p (h); h = ly_cdr (h))
+  for (; is_pair (h); h = ly_cdr (h))
     {
       Grob *se = unsmob_grob (ly_car (h));
       
@@ -71,7 +71,7 @@ Note_column::dir (Grob*  me)
   Grob *stem = unsmob_grob (me->get_property ("stem"));
   if (stem && Stem::has_interface (stem))
     return Stem::get_direction (stem);
-  else if (ly_pair_p (me->get_property ("note-heads")))
+  else if (is_pair (me->get_property ("note-heads")))
     return (Direction)sign (head_positions_interval (me).center ());
 
   programming_error ("Note column without heads and stem!");
@@ -100,7 +100,7 @@ Note_column::add_head (Grob*me,Grob *h)
   bool both = false;
   if (Rest::has_interface (h))
     {
-      if (ly_pair_p (me->get_property ("note-heads")))
+      if (is_pair (me->get_property ("note-heads")))
        both = true;
       else
        me->set_property ("rest", h->self_scm ());
@@ -126,7 +126,7 @@ void
 Note_column::translate_rests (Grob*me, int dy)
 {
   Grob * r = unsmob_grob (me->get_property ("rest"));
-  if (r && !ly_number_p (r->get_property ("staff-position")))
+  if (r && !is_number (r->get_property ("staff-position")))
     {
       r->translate_axis (dy * Staff_symbol_referencer::staff_space (r)/2.0, Y_AXIS);
     }
@@ -158,7 +158,7 @@ Note_column::accidentals (Grob *me)
 {
   SCM heads = me->get_property ("note-heads");
   Grob * acc = 0;
-  for (;ly_pair_p (heads); heads =ly_cdr (heads))
+  for (;is_pair (heads); heads =ly_cdr (heads))
     {
       Grob * h = unsmob_grob (ly_car (heads));
       acc = h ? unsmob_grob (h->get_property ("accidental-grob")) : 0;
index 0a771b53d021af07021cf100ee023834212c4e55..1c4c98c0c47ccf9c7415b2a34cf0743cb5b87f3d 100644 (file)
@@ -122,7 +122,7 @@ Stencil
 internal_print (Grob *me, bool with_ledgers)
 {
   SCM style  = me->get_property ("style");
-  if (!ly_symbol_p (style))
+  if (!is_symbol (style))
     {
       return Stencil ();
     }
@@ -251,7 +251,7 @@ Note_head::brew_ez_stencil (SCM smob)
   SCM idx = scm_int2num (pit->get_notename ());
   SCM names = me->get_property ("note-names");
   SCM charstr = SCM_EOL;
-  if (ly_vector_p (names))
+  if (is_vector (names))
     charstr = scm_vector_ref (names, idx);
   else
     {
@@ -291,7 +291,7 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a)
   if (brewer == Note_head::print_proc)
     {
       SCM style  = me->get_property ("style");
-      if (!ly_symbol_p (style))
+      if (!is_symbol (style))
        {
          return 0.0;
        }
@@ -317,11 +317,11 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a)
     Fallback
    */
   SCM v = me->get_property ("stem-attachment-function");
-  if (!ly_procedure_p (v))
+  if (!is_procedure (v))
     return 0.0;
   
   SCM result = scm_call_2 (v, me->self_scm (), scm_int2num (a));
-  if (!ly_pair_p (result))
+  if (!is_pair (result))
     return 0.0;
 
   result = (a == X_AXIS) ? ly_car (result) : ly_cdr (result);
@@ -333,7 +333,7 @@ int
 Note_head::get_balltype (Grob*me) 
 {
   SCM s = me->get_property ("duration-log");
-  return ly_number_p (s) ? ly_scm2int (s) <? 2 : 0;
+  return is_number (s) ? ly_scm2int (s) <? 2 : 0;
 }
 
 ADD_INTERFACE (Note_head,"note-head-interface",
index 8c1460b567b718e43d923b5b2988181741f9b154..975e462add06b8d3a175a2ac11c18fd0de290c51 100644 (file)
@@ -82,7 +82,7 @@ Note_heads_engraver::process_music ()
 
       int pos = pit ? pit->steps () : 0;
       SCM c0 = get_property ("middleCPosition");
-      if (ly_number_p (c0))
+      if (is_number (c0))
        pos += ly_scm2int (c0);
 
       note->set_property ("staff-position",   scm_int2num (pos));
index 6df5ab17c301ff8630c577c14fca4fecde254863..f3e54e904c508bac16482ede9e03b814cc974714 100644 (file)
@@ -42,7 +42,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
   Interval left_head_wid; 
   do
     {
-      for (SCM  s = props[d]; ly_pair_p (s); s = ly_cdr (s))
+      for (SCM  s = props[d]; is_pair (s); s = ly_cdr (s))
        {
          Item * it= dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
          
@@ -188,7 +188,7 @@ Note_spacing::right_column (Grob*me)
   Item *mincol = 0;
   int min_rank = INT_MAX;
   bool prune = false;
-  for (SCM s = right ; ly_pair_p (s) ; s = ly_cdr (s))
+  for (SCM s = right ; is_pair (s) ; s = ly_cdr (s))
     {
       Item * ri = unsmob_item (ly_car (s));
 
@@ -209,7 +209,7 @@ Note_spacing::right_column (Grob*me)
     {
       // I'm a lazy bum. We could do this in-place.
       SCM newright  = SCM_EOL;
-      for (SCM s = right ; ly_pair_p (s) ; s =ly_cdr (s))
+      for (SCM s = right ; is_pair (s) ; s =ly_cdr (s))
        {
          if (unsmob_item (ly_car (s))->get_column () == mincol)
            newright = scm_cons (ly_car (s), newright);
@@ -264,7 +264,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn,
   
   do
     {
-      for (SCM  s = props[d]; ly_pair_p (s); s = ly_cdr (s))
+      for (SCM  s = props[d]; is_pair (s); s = ly_cdr (s))
        {
          Item * it= dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
 
index 30c122da5da44d113c18c40d8901150ff369d158..adc106edcc9f609b70d8145b4d4ee70727390c08 100644 (file)
@@ -88,7 +88,7 @@ Ottava_bracket::print (SCM smob)
       Interval ext;
       if (Note_column::has_interface (b))
        {
-         for (SCM s = b->get_property ("note-heads"); ly_pair_p (s); s =ly_cdr (s))
+         for (SCM s = b->get_property ("note-heads"); is_pair (s); s =ly_cdr (s))
            ext.unite (unsmob_grob (ly_car (s))->extent (common, X_AXIS));
        }
 
index 562599d5f2b6fe012be2d3b04c45e0e39252993a..338100e7a68f49c857209cebd06e0c11f2944242 100644 (file)
@@ -46,7 +46,7 @@ Ottava_spanner_engraver::process_music ()
     {
       finished_= span_;
       span_ = 0;
-      if (ly_string_p (ott))
+      if (is_string (ott))
        {
          span_  = make_spanner ("OttavaBracket");
          span_->set_property ("text", ott);
index 04a842421425aea78c2802e52f690cad3384b9c5..88a0168abde96f0dedbcf5707e371c5754c5c89d 100644 (file)
@@ -45,7 +45,7 @@ Output_property_engraver::acknowledge_grob (Grob_info inf)
 
 
 
-      if (ly_procedure_p (pred))
+      if (is_procedure (pred))
        {
          /*
            should typecheck pred. 
index d605b3a7b1b0ab7cce07cec64d424d7f06e7ed13..c552f51d33783801c6650f7048a2a84a9b9fa280 100644 (file)
@@ -479,10 +479,10 @@ LY_DEFINE (ly_ragged_page_breaks, "ly:ragged-page-breaks",
           "Return a vector with line numbers of page breaks.")
 {
   SCM_ASSERT_TYPE (scm_pair_p (lines), lines, SCM_ARG1, __FUNCTION__, "list");
-  SCM_ASSERT_TYPE (ly_number_p (book), book, SCM_ARG2, __FUNCTION__, "real");
-  SCM_ASSERT_TYPE (ly_number_p (text), text, SCM_ARG2, __FUNCTION__, "real");
-  SCM_ASSERT_TYPE (ly_number_p (first), first, SCM_ARG2, __FUNCTION__, "real");
-  SCM_ASSERT_TYPE (ly_number_p (last), last, SCM_ARG2, __FUNCTION__, "real");
+  SCM_ASSERT_TYPE (is_number (book), book, SCM_ARG2, __FUNCTION__, "real");
+  SCM_ASSERT_TYPE (is_number (text), text, SCM_ARG2, __FUNCTION__, "real");
+  SCM_ASSERT_TYPE (is_number (first), first, SCM_ARG2, __FUNCTION__, "real");
+  SCM_ASSERT_TYPE (is_number (last), last, SCM_ARG2, __FUNCTION__, "real");
 
   return c_ragged_page_breaks (lines,
                               ly_scm2double (book), ly_scm2double (text),
index fcbb2d3f78e8af65631d43aec462d1131a740a23..0314006cb767e2f6901e5a843e963f4d5cf3a2de 100644 (file)
@@ -99,8 +99,8 @@ Paper_column::is_musical (Grob *me)
 bool
 Paper_column::is_used (Grob*me)
 {
-  return ly_pair_p (me->get_property ("elements")) ||  Item::is_breakable (me)
-    || ly_pair_p (me->get_property ("bounded-by-me"))
+  return is_pair (me->get_property ("elements")) ||  Item::is_breakable (me)
+    || is_pair (me->get_property ("bounded-by-me"))
     ;
 }
 
@@ -147,7 +147,7 @@ Paper_column::before_line_breaking (SCM grob)
   SCM c = me->get_property ("bounded-by-me");
   SCM *ptrptr = &c;
 
-  while (ly_pair_p (*ptrptr))
+  while (is_pair (*ptrptr))
     {
       Grob * g = unsmob_grob (ly_car (*ptrptr));
 
index 7d6aabd9bd283b6a5102f10b8fce43294a9e339e..96497b964b21b13fd0d0f475fe214bc74f41968b 100644 (file)
@@ -101,13 +101,13 @@ Paper_def::get_paper_outputter (String outname)  const
 
 
 Font_metric *
-Paper_def::find_scaled_font (Font_metric *f, Real m)
+Paper_def::find_scaled_font (Font_metric *f, Real m, SCM input_enc_name)
 {
   SCM sizes = scm_hashq_ref (scaled_fonts_, f->self_scm (), SCM_BOOL_F);
   if (sizes != SCM_BOOL_F)
     {
       SCM met = scm_assoc (scm_make_real (m), sizes);
-      if (ly_pair_p (met))
+      if (is_pair (met))
        return unsmob_metrics (ly_cdr (met));
     }
   else
@@ -136,10 +136,10 @@ Paper_def::find_scaled_font (Font_metric *f, Real m)
        */
       SCM l = SCM_EOL;
       SCM *t =  &l;
-      for (SCM s = vf->get_font_list (); ly_pair_p (s); s = ly_cdr (s))
+      for (SCM s = vf->get_font_list (); is_pair (s); s = ly_cdr (s))
        {
          Font_metric*scaled
-           = find_scaled_font (unsmob_metrics (ly_car (s)), m);
+           = find_scaled_font (unsmob_metrics (ly_car (s)), m, input_enc_name);
          *t = scm_cons (scaled->self_scm (), SCM_EOL);
          t = SCM_CDRLOC(*t);
        }
@@ -150,11 +150,14 @@ Paper_def::find_scaled_font (Font_metric *f, Real m)
   else
     {
       SCM scale_var = ly_module_lookup (scope_, ly_symbol2scm ("outputscale"));
-      SCM coding_var = ly_module_lookup (scope_, ly_symbol2scm ("inputencoding"));
 
+      if (!is_symbol (input_enc_name))
+       {
+         SCM var = ly_module_lookup (scope_, ly_symbol2scm ("inputencoding"));
+         input_enc_name = scm_variable_ref (var);
+       }
       m /= ly_scm2double (scm_variable_ref (scale_var));
-      val = Modified_font_metric::make_scaled_font_metric (scm_variable_ref (coding_var),
-                                                          f, m);
+      val = Modified_font_metric::make_scaled_font_metric (input_enc_name, f, m);
     }
 
   sizes = scm_acons (scm_make_real (m), val, sizes);
@@ -176,10 +179,10 @@ Paper_def::font_descriptions () const
   SCM func = ly_scheme_function ("hash-table->alist");
 
   SCM l = SCM_EOL;
-  for (SCM s = scm_call_1 (func, scaled_fonts_); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = scm_call_1 (func, scaled_fonts_); is_pair (s); s = ly_cdr (s))
     {
       SCM entry = ly_car (s);
-      for (SCM t = ly_cdr (entry); ly_pair_p (t); t  = ly_cdr (t))
+      for (SCM t = ly_cdr (entry); is_pair (t); t  = ly_cdr (t))
        {
          Font_metric *fm= unsmob_metrics (ly_cdar (t));
 
index 2db6aaa9cc18a23ba025b19a33018015123ab34d..94003c5b08e5fe059140d2a9a5103e90256c47c6 100644 (file)
@@ -191,7 +191,7 @@ Paper_outputter::output_line (SCM line, Offset *origin, bool is_last)
     }
 
   SCM between = SCM_EOL;
-  for (SCM s = pl->stencils (); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = pl->stencils (); is_pair (s); s = ly_cdr (s))
     {
       Stencil *stil = unsmob_stencil (ly_car (s));
       if (stil)
@@ -224,7 +224,7 @@ Paper_outputter::output_expr (SCM expr, Offset o)
 {
   while (1)
     {
-      if (!ly_pair_p (expr))
+      if (!is_pair (expr))
        return;
   
       SCM head =ly_car (expr);
index 347c3445c0e32c027a7aa0612bc938bb81cc8445..4b116f28e7ee50d041b5152e7a82eb69a007bb32 100644 (file)
@@ -71,9 +71,9 @@ void
 tag_music (Music *m, SCM tag, Input ip)
 {
        SCM tags = m->get_property ("tags");
-       if (ly_symbol_p (tag))
+       if (is_symbol (tag))
                tags = scm_cons (tag, tags);
-       else if (ly_list_p (tag))
+       else if (is_list (tag))
                tags = ly_append2 (tag, tags);
        else
                ip.warning (_ ("Tag must be symbol or list of symbols."));
@@ -106,7 +106,6 @@ SCM
 make_simple_markup (SCM encoding, SCM a)
 {
        SCM simple = ly_scheme_function ("simple-markup");
-       SCM markup = 
        if (gh_symbol_p (encoding))
        {
                return scm_list_3 (ly_scheme_function ("encoded-simple-markup"),
@@ -127,7 +126,7 @@ is_is_duration (int t)
 void
 set_music_properties (Music *p, SCM a)
 {
-  for (SCM k = a; ly_pair_p (k); k = ly_cdr (k))
+  for (SCM k = a; is_pair (k); k = ly_cdr (k))
        p->internal_set_property (ly_caar (k), ly_cdar (k));
 }
 
@@ -157,8 +156,8 @@ make_chord (SCM pitch, SCM dur, SCM modification_list)
 bool
 ly_input_procedure_p (SCM x)
 {
-       return ly_procedure_p (x)
-               || (ly_pair_p (x) && ly_procedure_p (ly_car (x)));
+       return is_procedure (x)
+               || (is_pair (x) && is_procedure (ly_car (x)));
 }
 
 Music*
@@ -431,7 +430,7 @@ toplevel_expression:
        | score_block {
                Score *sc = $1;
 
-               SCM head = ly_module_p (sc->header_) ? sc->header_ : THIS->input_file_->header_.to_SCM ();
+               SCM head = is_module (sc->header_) ? sc->header_ : THIS->input_file_->header_.to_SCM ();
 
                Path p = split_path (THIS->output_basename_);
                int *c = &THIS->input_file_->score_count_;
@@ -580,7 +579,7 @@ context_def_spec_body:
        | context_def_spec_body GROBDESCRIPTIONS embedded_scm {
                Context_def*td = unsmob_context_def ($$);
 
-               for (SCM p = $3; ly_pair_p (p); p = ly_cdr (p)) {
+               for (SCM p = $3; is_pair (p); p = ly_cdr (p)) {
                        SCM tag = ly_caar (p);
 
                        /* TODO: should make new tag "grob-definition" ? */
@@ -619,7 +618,7 @@ score_body:
                        guh.
                */
                SCM check_funcs = ly_scheme_function ("toplevel-music-functions");
-               for (; ly_pair_p (check_funcs); check_funcs = ly_cdr (check_funcs))
+               for (; is_pair (check_funcs); check_funcs = ly_cdr (check_funcs))
                        m = scm_call_1 (ly_car (check_funcs), m);
                $$->music_ = m;
 
@@ -739,7 +738,7 @@ Music_list:
                SCM s = $$;
                SCM c = scm_cons ($2->self_scm (), SCM_EOL);
                scm_gc_unprotect_object ($2->self_scm ()); /* UGH */
-               if (ly_pair_p (ly_cdr (s)))
+               if (is_pair (ly_cdr (s)))
                        scm_set_cdr_x (ly_cdr (s), c); /* append */
                else
                        scm_set_car_x (s, c); /* set first cons */
@@ -769,7 +768,7 @@ Repeated_music:
        {
                Music *beg = $4;
                int times = $3;
-               SCM alts = ly_pair_p ($5) ? ly_car ($5) : SCM_EOL;
+               SCM alts = is_pair ($5) ? ly_car ($5) : SCM_EOL;
                if (times < scm_ilength (alts)) {
                  unsmob_music (ly_car (alts))
                    ->origin ()->warning (
@@ -791,7 +790,7 @@ Repeated_music:
                r->set_property ("repeat-count", scm_int2num (times >? 1));
 
                r-> set_property ("elements",alts);
-               if (ly_equal_p ($2, scm_makfrom0str ("tremolo"))) {
+               if (is_equal ($2, scm_makfrom0str ("tremolo"))) {
                        /*
                        TODO: move this code to Scheme.
                        */
@@ -1267,7 +1266,7 @@ note_chord_element:
                SCM es = $1->get_property ("elements");
                SCM postevs = scm_reverse_x ($3, SCM_EOL);
 
-               for (SCM s = es; ly_pair_p (s); s = ly_cdr (s))
+               for (SCM s = es; is_pair (s); s = ly_cdr (s))
                  unsmob_music (ly_car (s))->set_property ("duration", dur);
                es = ly_append2 (es, postevs);
 
@@ -1315,7 +1314,7 @@ chord_body_element:
                if ($2 % 2 || $3 % 2)
                        n->set_property ("force-accidental", SCM_BOOL_T);
 
-               if (ly_pair_p ($4)) {
+               if (is_pair ($4)) {
                        SCM arts = scm_reverse_x ($4, SCM_EOL);
                        n->set_property ("articulations", arts);
                }
@@ -1327,7 +1326,7 @@ chord_body_element:
                n->set_property ("drum-type", $1);
                n->set_spot (THIS->here_input ());
 
-               if (ly_pair_p ($2)) {
+               if (is_pair ($2)) {
                        SCM arts = scm_reverse_x ($2, SCM_EOL);
                        n->set_property ("articulations", arts);
                }
@@ -1368,7 +1367,7 @@ command_element:
                        evs = scm_hash_ref (tab, key, SCM_BOOL_F);
                }
                Music *quote = 0;
-               if (ly_vector_p (evs))
+               if (is_vector (evs))
                {
                        quote = MY_MAKE_MUSIC ("QuoteMusic");
                        quote->set_property ("duration", $3);
@@ -1622,7 +1621,7 @@ direction_reqd_event:
        | script_abbreviation {
                SCM s = THIS->lexer_->lookup_identifier ("dash" + ly_scm2string ($1));
                Music *a = MY_MAKE_MUSIC ("ArticulationEvent");
-               if (ly_string_p (s))
+               if (is_string (s))
                        a->set_property ("articulation-type", s);
                else THIS->parser_error (_ ("Expecting string as script definition"));
                $$ = a;
@@ -1929,7 +1928,7 @@ bass_figure:
                Music *m = unsmob_music ($1);
                if ($2) {
                        SCM salter = m->get_property ("alteration");
-                       int alter = ly_number_p (salter) ? ly_scm2int (salter) : 0;
+                       int alter = is_number (salter) ? ly_scm2int (salter) : 0;
                        m->set_property ("alteration",
                                scm_int2num (alter + $2));
                } else {
@@ -1992,7 +1991,7 @@ simple_element:
                n->set_property ("pitch", $1);
                n->set_property ("duration", $5);
 
-               if (ly_number_p ($4))
+               if (is_number ($4))
                {
                        int q = ly_scm2int ($4);
                        n->set_property ("absolute-octave", scm_int2num (q-1));
@@ -2030,7 +2029,7 @@ simple_element:
                Music *m = unsmob_music ($1);
                Input i = THIS->pop_spot ();
                m->set_spot (i);
-               for (SCM s = m->get_property ("elements"); ly_pair_p (s); s = ly_cdr (s))
+               for (SCM s = m->get_property ("elements"); is_pair (s); s = ly_cdr (s))
                {
                        unsmob_music (ly_car (s))->set_property ("duration", $2);
                }
@@ -2401,10 +2400,10 @@ otherwise, we have to import music classes into the lexer.
 int
 My_lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
 {
-       if (ly_string_p (sid)) {
+       if (is_string (sid)) {
                *destination = sid;
                return STRING_IDENTIFIER;
-       } else if (ly_number_p (sid)) {
+       } else if (is_number (sid)) {
                *destination = sid;
                return NUMBER_IDENTIFIER;
        } else if (unsmob_context_def (sid)) {
@@ -2480,7 +2479,7 @@ property_op_to_music (SCM op)
                bool itc = internal_type_checking_global_b;
                /* UGH.
                */
-               bool autobeam = ly_equal_p (symbol, ly_symbol2scm ("autoBeamSettings"));
+               bool autobeam = is_equal (symbol, ly_symbol2scm ("autoBeamSettings"));
                if (autobeam)
                        internal_type_checking_global_b = false;
                m->set_property ("grob-property", grob_sym);
@@ -2504,10 +2503,10 @@ context_spec_music (SCM type, SCM id, Music *m, SCM ops)
        scm_gc_unprotect_object (m->self_scm ());
 
        csm->set_property ("context-type",
-               ly_symbol_p (type) ? type : scm_string_to_symbol (type));
+               is_symbol (type) ? type : scm_string_to_symbol (type));
        csm->set_property ("property-operations", ops);
 
-       if (ly_string_p (id))
+       if (is_string (id))
                csm->set_property ("context-id", id);
        return csm;
 }
index 1d7e103d8e7060e87def80d87f0fef38f7dc6ebb..a40151ee1566d1fed6200b866485230a704f1a36 100644 (file)
@@ -370,7 +370,7 @@ Part_combine_iterator::process (Moment m)
   Moment now = get_outlet ()->now_mom ();
   Moment *splitm = 0;
   
-  for (; ly_pair_p (split_list_); split_list_ = ly_cdr (split_list_))
+  for (; is_pair (split_list_); split_list_ = ly_cdr (split_list_))
     {
       splitm = unsmob_moment (ly_caar (split_list_));
       if (splitm && *splitm + start_moment_ > now)
@@ -392,10 +392,10 @@ Part_combine_iterator::process (Moment m)
        solo1 ();
       else if (tag == ly_symbol2scm ("solo2"))
        solo2 ();
-      else if (ly_symbol_p (tag))
+      else if (is_symbol (tag))
        {
          String s =  "Unknown split directive: "
-           + (ly_symbol_p (tag) ? ly_symbol2string (tag) : String ("not a symbol")); 
+           + (is_symbol (tag) ? ly_symbol2string (tag) : String ("not a symbol")); 
          programming_error (s);
        }
     }
index acbe2744e71657bf3452ed734ceb160bc1c57707..7054d2d0569b9d297ef73e2144999be5c1b21ac4 100644 (file)
@@ -41,7 +41,7 @@ Performer_group_performer::acknowledge_audio_elements ()
     {
       Audio_element_info info = announce_infos_[j];
 
-      for (SCM p = get_simple_trans_list (); ly_pair_p (p); p = ly_cdr (p))
+      for (SCM p = get_simple_trans_list (); is_pair (p); p = ly_cdr (p))
        {
          Translator * t = unsmob_translator (ly_car (p));
          Performer * eng = dynamic_cast<Performer*> (t);
@@ -76,7 +76,7 @@ Performer_group_performer::Performer_group_performer ()
 void
 performer_each (SCM list, Performer_method method)
 {
-  for (SCM p = list; ly_pair_p (p); p = ly_cdr (p))
+  for (SCM p = list; is_pair (p); p = ly_cdr (p))
     {
       Performer * e = dynamic_cast<Performer*>(unsmob_translator (ly_car (p)));
       if (e)
index d92d9c631703299ef1f8ae76a1492e79f04375fa..95cc99d30e8d059e8041dbda7c53463a44f7be8b 100644 (file)
@@ -163,7 +163,7 @@ Piano_pedal_engraver::try_music (Music *m)
       for (Pedal_info*p = info_list_; p->name_; p ++)
        {
          String nm = p->name_ + String ("Event");
-         if (ly_equal_p (m->get_property ("name") ,
+         if (is_equal (m->get_property ("name") ,
                          scm_str2symbol(nm.to_str0())))
            {
              Direction d = to_dir (m->get_property ("span-direction"));
@@ -291,7 +291,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
        }
     }
       
-  if (ly_string_p (s))
+  if (is_string (s))
     {
       String propname = String (p->name_) + "Pedal";
 
index 1223d3114e5c35a20e844e33a92efff4c1fee90a..d18adc8d17b66bf1ccf0ee4e09937aa988e37887 100644 (file)
@@ -130,7 +130,7 @@ Piano_pedal_performer::try_music (Music* r)
       for (Pedal_info*p = info_alist_; p->name_; p ++)
        {
          String nm = p->name_ + String ("Event");
-         if (ly_equal_p (r->get_property ("name") ,
+         if (is_equal (r->get_property ("name") ,
                          scm_str2symbol (nm.to_str0())))
            {
              Direction d = to_dir (r->get_property ("span-direction"));
index ae1cc13bc787b2a3e3b557b2ceb3100742053c0b..d8a4a828de6ce426b6fdf69e9e1975517abc2084 100644 (file)
@@ -22,7 +22,7 @@ void
 Pitch_squash_engraver::acknowledge_grob (Grob_info i)
 {
   SCM newpos = get_property ("squashedPosition");
-  if (ly_number_p (newpos)
+  if (is_number (newpos)
       && Note_head::has_interface (i.grob_))
     {
       i.grob_->set_property ("staff-position", newpos);
index 18dbfeba72e60180b142be7e18b274316bf574f7..acbc5e0f751e1f602d7e3da12303e7752291d576 100644 (file)
@@ -21,7 +21,7 @@ void
 Property_iterator::process (Moment m)
 {
   SCM sym = get_music ()->get_property ("symbol");
-  if (ly_symbol_p (sym))
+  if (is_symbol (sym))
     {
       SCM val = get_music ()->get_property ("value");
       bool ok= true;
index 6ebbe296cd1814c91d8cb8313a9feda4aa56957d..163f9256e5a67f4f94bbcd8fd31e762029140401 100644 (file)
@@ -100,7 +100,7 @@ Quote_iterator::construct_children ()
   start_moment_ = now;
   event_vector_ = get_music ()->get_property ("quoted-events");
 
-  if (ly_vector_p (event_vector_))
+  if (is_vector (event_vector_))
     {
       event_idx_ = binsearch_scm_vector (event_vector_, now.smobbed_copy (), &moment_less);
       end_idx_ = binsearch_scm_vector (event_vector_, stop.smobbed_copy (), &moment_less);
@@ -144,12 +144,12 @@ Quote_iterator::process (Moment m)
       event_idx_++;
     }
 
-  if (ly_pair_p (entry))
+  if (is_pair (entry))
     {
       Pitch * quote_pitch = unsmob_pitch (ly_cdar (entry));
       Pitch * me_pitch = unsmob_pitch (get_outlet ()->get_property ("instrumentTransposition"));
       
-      for (SCM s = ly_cdr (entry); ly_pair_p (s); s = ly_cdr (s))
+      for (SCM s = ly_cdr (entry); is_pair (s); s = ly_cdr (s))
        {
          SCM ev_acc = ly_car (s);
 
index 6ccd234e62635a3bd627cda799b6bd6853bf7bb1..3a13dc0e25c7d2cbd72a8a20c9de5fefd0eb78df 100644 (file)
@@ -52,9 +52,9 @@ Recording_group_engraver::start_translation_timestep ()
 void
 Recording_group_engraver::start ()
 {
-  if (!ly_pair_p (accumulator_))
+  if (!is_pair (accumulator_))
     accumulator_ = scm_cons (SCM_EOL, SCM_EOL);
-  if (!ly_pair_p (ly_car (accumulator_)))
+  if (!is_pair (ly_car (accumulator_)))
     {
       /*
        Need to store transposition for every moment; transposition changes during pieces.
@@ -80,7 +80,7 @@ Recording_group_engraver::finalize ()
   Engraver_group_engraver::finalize ();
   SCM proc = get_property ("recordEventSequence");
 
-  if (ly_procedure_p (proc))
+  if (is_procedure (proc))
     scm_call_2  (proc, daddy_context_->self_scm (), ly_cdr (accumulator_));
 
   accumulator_ = SCM_EOL;
index 134017428bddc4627a6241f18bab27d612263daf..b6c94d757279ba4e7e94c38e69ef58125510c134 100644 (file)
@@ -71,14 +71,14 @@ Repeat_acknowledge_engraver::process_music ()
   bool start = false;
   bool end = false;
   bool volta_found = false;
-  while (ly_pair_p (cs))
+  while (is_pair (cs))
     {
       SCM command = ly_car (cs);
       if (command == ly_symbol2scm ("start-repeat"))
        start = true;
       else if (command == ly_symbol2scm ("end-repeat"))
        end = true;
-      else if (ly_pair_p (command) && ly_car (command) == ly_symbol2scm ("volta"))
+      else if (is_pair (command) && ly_car (command) == ly_symbol2scm ("volta"))
        volta_found = true;
       cs = ly_cdr (cs);      
     }
@@ -100,9 +100,9 @@ Repeat_acknowledge_engraver::process_music ()
    */
   SCM wb = get_property ("whichBar");
   SCM db  = get_property ("defaultBarType");
-  if (!ly_string_p (wb) || ly_equal_p (db, wb))
+  if (!is_string (wb) || is_equal (db, wb))
     {
-      if (s != "" || (volta_found && !ly_string_p (wb)))
+      if (s != "" || (volta_found && !is_string (wb)))
        {
          daddy_context_->set_property ("whichBar", scm_makfrom0str (s.to_str0 ()));
        }
index 7aa77605fc1381195314e343f33d20d10d51c0d8..daf7611a70451d0ce3129db8daa93b94f1c19984 100644 (file)
@@ -42,7 +42,7 @@ Repeated_music::to_relative_octave (Pitch p)
        {
          lily_1_8_compatibility_used = true; 
 
-         for (SCM s = alternatives (); ly_pair_p (s);  s = ly_cdr (s))
+         for (SCM s = alternatives (); is_pair (s);  s = ly_cdr (s))
            unsmob_music (ly_car (s))->to_relative_octave (p);
        }     
 
@@ -68,7 +68,7 @@ Repeated_music::alternatives_get_length (bool fold) const
   int done =0;
 
   SCM p = alternatives ();
-  while (ly_pair_p (p) && done < repeat_count ())
+  while (is_pair (p) && done < repeat_count ())
     {
       m = m + unsmob_music (ly_car (p))->get_length ();
       done ++;
@@ -90,7 +90,7 @@ Repeated_music::alternatives_volta_get_length () const
 
   Moment m;
   SCM p = alternatives ();
-  while (ly_pair_p (p))
+  while (is_pair (p))
     {
       m = m + unsmob_music (ly_car (p))->get_length ();
       p = ly_cdr (p);
index 37396176380f047ed6e8eeefdee77a037c75dbd1..0bd15d3ecc5cb74769f7d2e910e7851533469907 100644 (file)
@@ -87,7 +87,7 @@ Rest_collision::do_shift (Grob *me)
   Link_array<Grob> rests;
   Link_array<Grob> notes;
 
-  for (SCM s = elts; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = elts; is_pair (s); s = ly_cdr (s))
     {
       Grob * e = unsmob_grob (ly_car (s));
       if (unsmob_grob (e->get_property ("rest")))
index 83c56cccf4bad3fa87a40f3883615fa5fd7b375d..a7a993e5c91584d09ab7419099b287651ceb9b64 100644 (file)
@@ -94,7 +94,7 @@ Rest_engraver::process_music ()
        {
          int pos= p->steps ();
          SCM c0 = get_property ("middleCPosition");
-         if (ly_number_p (c0))
+         if (is_number (c0))
            pos += ly_scm2int (c0);
          
          rest_->set_property ("staff-position", scm_int2num (pos));
index 1e57bd8092655c47aba90063a3c2d703394ad822..7e3ceab703f99f31e31a12e3eb5041b11012a205 100644 (file)
@@ -120,14 +120,14 @@ Rest::brew_internal_stencil (SCM smob)
   Grob* me = unsmob_grob (smob);
 
   SCM balltype_scm = me->get_property ("duration-log");
-  if (!ly_number_p (balltype_scm))
+  if (!is_number (balltype_scm))
     return Stencil ().smobbed_copy ();
 
   int balltype = ly_scm2int (balltype_scm);
   
   String style; 
   SCM style_scm = me->get_property ("style");
-  if (ly_symbol_p (style_scm))
+  if (is_symbol (style_scm))
     style = ly_scm2string (scm_symbol_to_string (style_scm));
 
   Font_metric *fm = Font_interface::get_default_font (me);
@@ -161,7 +161,7 @@ SCM
 Rest::polyphonic_offset_callback (SCM smob, SCM)
 {
   Grob* me = unsmob_grob (smob);
-  if (ly_number_p (me->get_property ("staff-position")))
+  if (is_number (me->get_property ("staff-position")))
     return scm_make_real (0);
 
   Direction d = get_grob_direction (me);
index 71f91ae36b9397ab35ef41ef5e848a5e4aaea415..ebc03a0870092421ec883cd45badbb5dcfeda15f 100644 (file)
@@ -45,7 +45,7 @@ int
 Rhythmic_head::duration_log (Grob*me) 
 {
   SCM s = me->get_property ("duration-log");
-  return ly_number_p (s) ? ly_scm2int (s) : 0;
+  return is_number (s) ? ly_scm2int (s) : 0;
 }
 
 ADD_INTERFACE (Rhythmic_head,"rhythmic-head-interface",
index 6c0d5ba353712f0e6780b70ba4a46fe36ff544b1..c1425400edc9b35bf07bceb990eb118f95f0d999 100644 (file)
@@ -39,7 +39,7 @@ Modified_font_metric::Modified_font_metric (String coding, Font_metric* m, Real
       coding_vector_ = scm_call_1 (ly_scheme_function ("get-coding-vector"),
                                   scm_makfrom0str (coding_scheme_.to_str0 ()));
 
-      if (!ly_vector_p (coding_vector_))
+      if (!is_vector (coding_vector_))
        {
          programming_error ("get-coding-vector  should return vector");
          coding_vector_ = scm_c_make_vector (256, ly_symbol2scm (".notdef"));
@@ -262,7 +262,7 @@ Modified_font_metric::text_dimension (String text)
 
          Box char_box;
 
-         if (!ly_symbol_p (sym))
+         if (!is_symbol (sym))
            continue;
 
          char const * chars =  SCM_SYMBOL_CHARS(sym);
index c98e87c81614143754d17f008379e35ebff9825f..16c3a80bb0c737450b02e71edf830fbe5164fb63 100644 (file)
@@ -19,7 +19,7 @@ copy_scm_hashes (SCM dest, SCM src)
 {
   int k = 0;
   for (int i = SCM_VECTOR_LENGTH (src); i--;)
-    for (SCM s = scm_vector_ref (src, SCM_MAKINUM (i)); ly_pair_p (s); s = ly_cdr (s))
+    for (SCM s = scm_vector_ref (src, SCM_MAKINUM (i)); is_pair (s); s = ly_cdr (s))
       {
        scm_hashq_set_x (dest, ly_caar (s), ly_cdar (s));
        k++;
@@ -82,7 +82,7 @@ bool
 Scheme_hash_table::try_retrieve (SCM k, SCM *v)
 {
   SCM handle = scm_hashq_get_handle (hash_tab_, k);
-  if (ly_pair_p (handle))
+  if (is_pair (handle))
     {
       *v = ly_cdr (handle);
       return true;
@@ -95,13 +95,13 @@ Scheme_hash_table::try_retrieve (SCM k, SCM *v)
 bool
 Scheme_hash_table::contains (SCM k) const
 {
-  return ly_pair_p (scm_hashq_get_handle (hash_tab_, k));
+  return is_pair (scm_hashq_get_handle (hash_tab_, k));
 }
 
 void
 Scheme_hash_table::set (SCM k, SCM v)
 {
-  assert (ly_symbol_p (k));
+  assert (is_symbol (k));
   SCM handle = scm_hashq_create_handle_x (hash_tab_, k, SCM_UNDEFINED);
   if (ly_cdr (handle) == SCM_UNDEFINED)
     {
@@ -150,7 +150,7 @@ Scheme_hash_table::to_alist () const
 {
   SCM l = SCM_EOL;
   for (int i = SCM_VECTOR_LENGTH (hash_tab_); i--;)
-    for (SCM s = scm_vector_ref (hash_tab_, scm_int2num (i)); ly_pair_p (s); s = ly_cdr (s))
+    for (SCM s = scm_vector_ref (hash_tab_, scm_int2num (i)); is_pair (s); s = ly_cdr (s))
       {
        l = scm_acons (ly_caar (s), ly_cdar (s), l);
       }
index 14f7f45b65421dbcddb227299bc4dcf71c7d4668..52e0e07842fc17e6648313c865954b076f96afec 100644 (file)
@@ -268,12 +268,12 @@ Score_engraver::try_music (Music*r)
       gotcha = true;
 
       SCM pen = command_column_->get_property ("penalty");
-      Real total_penalty = ly_number_p (pen)
+      Real total_penalty = is_number (pen)
        ? ly_scm2double (pen)
        : 0.0;
 
       SCM rpen = r->get_property ("penalty");
-      if (ly_number_p (rpen))
+      if (is_number (rpen))
        total_penalty +=  ly_scm2double (rpen);
          
       if (total_penalty > 10000.0) //  ugh. arbitrary.
index 622c2b8b151b6a73c517b403498ec716366624d6..81f8576f0b9464d2880a8e4f3263e90b34e06707 100644 (file)
@@ -94,7 +94,7 @@ Score::Score (Score const &s)
     defs_.push (s.defs_[i]->clone ());
 
   header_ = ly_make_anonymous_module ();
-  if (ly_module_p (s.header_))
+  if (is_module (s.header_))
     ly_import_module (header_, s.header_);
 }
 
@@ -155,7 +155,7 @@ LY_DEFINE (ly_format_output, "ly:format-output",
 {
   Global_context *g = dynamic_cast<Global_context*> (unsmob_context (context));
   SCM_ASSERT_TYPE (g, context, SCM_ARG1, __FUNCTION__, "Global context");
-  SCM_ASSERT_TYPE (ly_string_p (outname), outname, SCM_ARG2, __FUNCTION__, "output filename");
+  SCM_ASSERT_TYPE (is_string (outname), outname, SCM_ARG2, __FUNCTION__, "output filename");
 
   Music_output *output = g->get_output ();
   progress_indication ("\n");
index 5942577323ec14a97c6ce668adf7ac5f570697d9..b84c18de3edc5659d71e14bf05d9a577400986f1 100644 (file)
@@ -15,7 +15,7 @@ void
 Script_column::add_staff_sided (Grob *me, Item *i)
 {
   SCM p = i->get_property ("script-priority");
-  if (!ly_number_p (p))
+  if (!is_number (p))
     return;
 
   Pointer_group_interface::add_grob (me, ly_symbol2scm ("scripts"),i);
@@ -44,7 +44,7 @@ Script_column::before_line_breaking (SCM smob)
   Drul_array<SCM> scripts (SCM_EOL, SCM_EOL);
   Link_array<Grob> staff_sided;
   
-  for (SCM s = me->get_property ("scripts"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("scripts"); is_pair (s); s = ly_cdr (s))
     {
       Grob *sc = unsmob_grob (ly_car (s));
 
@@ -74,7 +74,7 @@ Script_column::before_line_breaking (SCM smob)
       ss = scm_stable_sort_x (ss, grob_script_priority_less_proc);
       
       Grob * last = 0;
-      for (SCM s = ss; ly_pair_p (s); s = ly_cdr (s))
+      for (SCM s = ss; is_pair (s); s = ly_cdr (s))
        {
          Grob *g = unsmob_grob (ly_car (s));
          if (last)
index 918f4f89019d4d27c1cfd866960dee079796a60d..67078978c878522d16ba436d9ab294a5b4f734be 100644 (file)
@@ -50,7 +50,7 @@ Script_engraver::try_music (Music *r)
        This is necessary for part-combining.
        */
       for (int j = 0; j < scripts_.size (); j++)
-       if (ly_equal_p (scripts_[j]. event_->get_property ("articulation-type"),
+       if (is_equal (scripts_[j]. event_->get_property ("articulation-type"),
                        r->get_property ("articulation-type")
                        ))
          return true;
@@ -70,7 +70,7 @@ copy_property (Grob * g , SCM sym, SCM alist)
   if (g->internal_get_property (sym) == SCM_EOL)
     {
       SCM entry = scm_assoc (sym,alist);
-      if (ly_pair_p (entry))
+      if (is_pair (entry))
        {
          g->internal_set_property (sym, ly_cdr (entry));
        }
@@ -110,7 +110,7 @@ void make_script_from_event (Grob *p,
 
   int prio =0;
   SCM sprio = scm_assoc (ly_symbol2scm ("script-priority"), art);
-  if (ly_pair_p (sprio))
+  if (is_pair (sprio))
     prio = ly_scm2int (ly_cdr (sprio));
 
 
@@ -219,7 +219,7 @@ Script_engraver::stop_translation_timestep ()
       Grob * sc = scripts_[i].script_;
 
       SCM follow = scm_assoc (ly_symbol2scm ("follow-into-staff"), scripts_[i].description_);
-      if (ly_pair_p (follow) && to_boolean (ly_cdr (follow)))
+      if (is_pair (follow) && to_boolean (ly_cdr (follow)))
        {
          sc->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS);
          sc->set_property ("staff-padding", SCM_EOL);
index 95af0e32dcb2fabf63092557a54e7a8025852980..3d16fc7f5c5b3225e09c46045a80d858b8738848 100644 (file)
@@ -23,14 +23,14 @@ Stencil
 Script_interface::get_stencil (Grob * me, Direction d)
 {
   SCM s = me->get_property ("script-stencil");
-  assert (ly_pair_p (s));
+  assert (is_pair (s));
 
   SCM key = ly_car (s);
   if (key == ly_symbol2scm ("feta"))
     {
       SCM name_entry = ly_cdr (s);
 
-      SCM str = (ly_pair_p (name_entry)) ? index_get_cell (name_entry, d) :  name_entry;
+      SCM str = (is_pair (name_entry)) ? index_get_cell (name_entry, d) :  name_entry;
       return Font_interface::get_default_font (me)->find_by_name ("scripts-" +
                                                                  ly_scm2string (str));
     }
index 386f5a662673dff5438aab6200501187fd5ec5f0..70e2020743a52f90422f8ca720a0c3229ce27980 100644 (file)
@@ -28,7 +28,7 @@ Self_alignment_interface::aligned_on_parent (SCM element_smob, SCM axis)
   SCM sym= (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X"): ly_symbol2scm ("self-alignment-Y");
   SCM align_prop (me->internal_get_property (sym));
 
-  if (!ly_number_p (align_prop))
+  if (!is_number (align_prop))
     return scm_int2num (0);
 
   Real x = 0.0;
@@ -86,7 +86,7 @@ Self_alignment_interface::aligned_on_self (SCM element_smob, SCM axis)
   SCM sym= (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X"): ly_symbol2scm ("self-alignment-Y");
   
   SCM align (me->internal_get_property (sym));
-  if (ly_number_p (align))
+  if (is_number (align))
     {
       Interval ext (me->extent (me,a));
 
index e9b27a1eb06ee70100edae28278cb50b09edca92..5ac17e5b1717218cbf0efee58ba1684ccb41aab0 100644 (file)
@@ -28,7 +28,7 @@ Separating_group_spanner::find_rods (Item * r, SCM next, Real padding)
     return; 
 
 
-  for (; ly_pair_p (next); next = ly_cdr (next))
+  for (; is_pair (next); next = ly_cdr (next))
     {
       Item *l = dynamic_cast<Item*> (unsmob_grob (ly_car ( next)));
       Item *lb = l->find_prebroken_piece (RIGHT);
@@ -83,7 +83,7 @@ Separating_group_spanner::set_spacing_rods (SCM smob)
    */
   Real padding = robust_scm2double (me->get_property ("padding"), 0.1);
   
-  for (SCM s = me->get_property ("elements"); ly_pair_p (s) && ly_pair_p (ly_cdr (s)); s = ly_cdr (s))
+  for (SCM s = me->get_property ("elements"); is_pair (s) && is_pair (ly_cdr (s)); s = ly_cdr (s))
     {
       /*
        Order of elements is reversed!
index ab879f067ef70e76f3b2fd14fb6b4344fcf8ca2c..5024a98a705319681a5f6e0f70f61cfd1a6a1628 100644 (file)
@@ -40,7 +40,7 @@ Separation_item::conditional_width (Grob * me, Grob * left)
   Paper_column * pc = item->get_column ();
   
   
-  for (SCM s =  me->get_property ("conditional-elements"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s =  me->get_property ("conditional-elements"); is_pair (s); s = ly_cdr (s))
     {
       SCM elt = ly_car (s);
       if (!unsmob_grob (elt))
@@ -84,7 +84,7 @@ Separation_item::width (Grob *me)
   Paper_column * pc = item->get_column ();
   Interval w;
   
-  for (SCM s =  me->get_property ("elements"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s =  me->get_property ("elements"); is_pair (s); s = ly_cdr (s))
     {
       SCM elt = ly_car (s);
       if (!unsmob_grob (elt))
@@ -140,11 +140,11 @@ Separation_item::extremal_break_aligned_grob (Grob *separation_item, Direction d
   last_ext->set_empty ();
   Grob *last_grob = 0;
   for (SCM s = separation_item->get_property ("elements");
-       ly_pair_p (s); s = ly_cdr (s))
+       is_pair (s); s = ly_cdr (s))
     {
       Grob * break_item = unsmob_grob (ly_car (s));
       
-      if (!ly_symbol_p (break_item->get_property ("break-align-symbol")))
+      if (!is_symbol (break_item->get_property ("break-align-symbol")))
        continue;
 
       Interval ext = break_item->extent (col, X_AXIS);
index 2e7deb71d358f97ab7ddc6663df47befc397a6a6..25cdb05cd5feb0cf083009accdb2aacb137fe230 100644 (file)
@@ -23,7 +23,7 @@
   Invariant for the data structure.
 
 
-  if (ly_pair_p (cursor_))
+  if (is_pair (cursor_))
     iter_->music_ == unsmob_music (ly_car (cursor_))
   else
     iter_ == 0;
@@ -85,7 +85,7 @@ create_grace_fixup_list (SCM cursor)
   Grace_fixup *head = 0;
   Grace_fixup **tail = &head;
 
-  for (; ly_pair_p (cursor); cursor = ly_cdr (cursor))
+  for (; is_pair (cursor); cursor = ly_cdr (cursor))
     {
       Music *mus = unsmob_music (ly_car (cursor));
       Moment s = mus->start_mom ();
@@ -123,7 +123,7 @@ Sequential_iterator::construct_children ()
   cursor_ = get_music_list ();
 
   iter_ = 0;
-  if (ly_pair_p (cursor_))
+  if (is_pair (cursor_))
     {
       Music *m = unsmob_music (ly_car (cursor_));
       iter_ = unsmob_iterator (get_iterator (m));
@@ -188,7 +188,7 @@ Sequential_iterator::next_element (bool)
   cursor_ = ly_cdr (cursor_);
 
   iter_->quit ();
-  if (ly_pair_p (cursor_))
+  if (is_pair (cursor_))
     iter_ = unsmob_iterator (get_iterator (unsmob_music (ly_car (cursor_))));
   else
     iter_ = 0;
index c517492b84f0cc0901be81d3fbf598cd700dc061..82b1ff44ba5a4c12dc87b1fb146e52ff8ec74e66 100644 (file)
@@ -73,7 +73,7 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
   Grob * st = Staff_symbol_referencer::get_staff_symbol (me);
   bool include_staff = (st
                        && a == Y_AXIS
-                       && ly_number_p (me->get_property ("staff-padding")));
+                       && is_number (me->get_property ("staff-padding")));
 
   Interval dim;
   if (include_staff)
@@ -222,7 +222,7 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis)
  */
   Grob * st = Staff_symbol_referencer::get_staff_symbol (me);
   if (st && a == Y_AXIS
-      && ly_number_p (me->get_property ("staff-padding")))
+      && is_number (me->get_property ("staff-padding")))
     {
       Real padding=
       Staff_symbol_referencer::staff_space (me)
index acd312dd37bec12df0d1fbe4f1752916a42ad28e..cf695409a1d92d36333d8ca90e3194897ca8c031 100644 (file)
@@ -215,7 +215,7 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
   Link_array<Grob> cols (icols);
   
   for (int i =  cols.size (); i--;)
-    if (ly_pair_p (cols[i]->get_property ("between-cols")))
+    if (is_pair (cols[i]->get_property ("between-cols")))
       {
        loose_cols_.push (cols[i]);
        cols.del (i);
@@ -227,7 +227,7 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
       Spring_smob *spring = 0;
 
       for (SCM s = cols[i]->get_property ("ideal-distances");
-          !spring && ly_pair_p (s);
+          !spring && is_pair (s);
           s = ly_cdr (s))
        {
          Spring_smob *sp = unsmob_spring (ly_car (s));
@@ -285,7 +285,7 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
   for (int i=0; i < cols.size () - 1; i++)
     {
       for (SCM s = Spaceable_grob::get_minimum_distances (cols[i]);
-          ly_pair_p (s); s = ly_cdr (s))
+          is_pair (s); s = ly_cdr (s))
        {
          Grob * other = unsmob_grob (ly_caar (s));
          int oi = cols.find_index (other);
@@ -369,7 +369,7 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged)
   for (int i = sz; i--; )
     {
       SCM p = positions->cols_[i]->get_property ( "penalty");
-      if (ly_number_p (p))
+      if (is_number (p))
        {
          if (ly_scm2double (p) < -9999)
            break_satisfy = break_satisfy && (i == 0 || i == sz -1);
index e1403a12cacecfcf82c861ee97d71e8dd6fd6d8b..0619f45ca087756c0f967ad23b741c05c6d52afb 100644 (file)
@@ -29,7 +29,7 @@ Simultaneous_music_iterator::derived_mark () const
 void
 Simultaneous_music_iterator::derived_substitute (Context *f,Context *t)
 {
-  for (SCM s = children_list_; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = children_list_; is_pair (s); s = ly_cdr (s))
     unsmob_iterator (ly_car (s))-> substitute_outlet (f,t);
 }
 
@@ -42,7 +42,7 @@ Simultaneous_music_iterator::construct_children ()
 
   children_list_ = SCM_EOL;
   SCM * tail = &children_list_;
-  for (; ly_pair_p (i); i = ly_cdr (i), j++)
+  for (; is_pair (i); i = ly_cdr (i), j++)
     {
       Music *mus = unsmob_music (ly_car (i));
 
@@ -77,7 +77,7 @@ void
 Simultaneous_music_iterator::process (Moment until)
 {
   SCM *proc = &children_list_; 
-  while (ly_pair_p (*proc))
+  while (is_pair (*proc))
     {
       Music_iterator * i = unsmob_iterator (ly_car (*proc));
       if (i->run_always ()
@@ -103,7 +103,7 @@ Simultaneous_music_iterator::pending_moment () const
   Moment next;
   next.set_infinite (1);
   
-  for (SCM s = children_list_; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = children_list_; is_pair (s); s = ly_cdr (s))
     {
       Music_iterator * it = unsmob_iterator (ly_car (s));
       next = next <? it->pending_moment ();
@@ -116,7 +116,7 @@ bool
 Simultaneous_music_iterator::ok () const
 {
   bool run_always_ok = false; 
-  for (SCM s = children_list_; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = children_list_; is_pair (s); s = ly_cdr (s))
     {
       Music_iterator * it = unsmob_iterator (ly_car (s));
       if (!it->run_always ())
@@ -130,7 +130,7 @@ Simultaneous_music_iterator::ok () const
 bool
 Simultaneous_music_iterator::run_always () const
 {
-  for (SCM s = children_list_; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = children_list_; is_pair (s); s = ly_cdr (s))
     {
       Music_iterator * it = unsmob_iterator (ly_car (s));
       if (it->run_always ())
@@ -143,7 +143,7 @@ Music_iterator*
 Simultaneous_music_iterator::try_music_in_children (Music *m) const
 {
   Music_iterator * b=0;
-  for (SCM s = children_list_; !b && ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = children_list_; !b && is_pair (s); s = ly_cdr (s))
     b =unsmob_iterator (ly_car (s))->try_music (m);
   return b;
 }
@@ -151,7 +151,7 @@ Simultaneous_music_iterator::try_music_in_children (Music *m) const
 void
 Simultaneous_music_iterator::do_quit ()
 {
-  for (SCM s = children_list_; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = children_list_; is_pair (s); s = ly_cdr (s))
     unsmob_iterator (ly_car (s))->quit ();
 }
 
index 4a1c9445522538218bd7fbd5624f4ba0bb922b9c..635d5b3bed955e8966e8ce0d404025ff32e4b21f 100644 (file)
@@ -120,7 +120,7 @@ Slur::after_line_breaking (SCM smob)
       return SCM_UNSPECIFIED;
     }
   set_extremities (me);
-  if (!ly_pair_p (me->get_property ("control-points")))
+  if (!is_pair (me->get_property ("control-points")))
     set_control_points (me);
   return SCM_UNSPECIFIED;
 } 
@@ -133,7 +133,7 @@ Slur::check_slope (Grob *me)
     Avoid too steep slurs.
    */
   SCM s = me->get_property ("slope-limit");
-  if (ly_number_p (s))
+  if (is_number (s))
     {
       Array<Offset> encompass = get_encompass_offsets (me);
       Drul_array<Offset> attachment;
@@ -182,7 +182,7 @@ Slur::set_extremities (Grob *me)
   SCM att = me->get_property ("attachment");
       /*
        */
-      if (!ly_pair_p (att))
+      if (!is_pair (att))
        {
          programming_error ("attachment is not a cons?!");
          att = scm_cons (SCM_EOL, SCM_EOL);
@@ -193,15 +193,15 @@ Slur::set_extremities (Grob *me)
   do 
     {
     
-      if (!ly_symbol_p (index_get_cell (att, dir)))
+      if (!is_symbol (index_get_cell (att, dir)))
        {
          SCM p = me->get_property ("extremity-function");
          SCM res = ly_symbol2scm ("head");
          
-         if (ly_procedure_p (p))
+         if (is_procedure (p))
            res =  scm_call_2 (p, me->self_scm (), scm_int2num (dir));
 
-         if (ly_symbol_p (res))
+         if (is_symbol (res))
            index_set_cell (att, dir, res);
        }
     }
@@ -218,7 +218,7 @@ Slur::get_boundary_notecolumn_y (Grob *me, Direction dir)
 {
   SCM cols = me->get_property ("note-columns");
 
-  if (!ly_pair_p (cols))
+  if (!is_pair (cols))
     {
       programming_error ("No note-columns in slur?");
       me->suicide ();
@@ -288,7 +288,7 @@ Slur::get_attachment (Grob *me, Direction dir,
                      Grob **common) 
 {
   SCM s = me->get_property ("attachment");
-  if (!ly_pair_p (s) || !ly_symbol_p (index_get_cell (s, dir)))
+  if (!is_pair (s) || !is_symbol (index_get_cell (s, dir)))
     {
       s = set_extremities (me);
     }
@@ -565,7 +565,7 @@ Slur::print (SCM smob)
     TODO: replace dashed with generic property.
    */
   SCM d =  me->get_property ("dashed");
-  if (ly_number_p (d))
+  if (is_number (d))
     a = Lookup::dashed_slur (one, thick, thick * robust_scm2double (d, 0));
   else
     a = Lookup::slur (one, get_grob_direction (me) * base_thick * ss / 10.0,
@@ -598,13 +598,13 @@ Slur::set_control_points (Grob*me)
 
       SCM ssb = me->get_property ("beautiful");
       Real sb = 0;
-      if (ly_number_p (ssb))
+      if (is_number (ssb))
        sb = ly_scm2double (ssb);
 
       bb.minimise_enclosed_area (sb, details);
       SCM sbf = scm_assq (ly_symbol2scm ("force-blowfit"), details);
       Real bff = 1.0;
-      if (ly_pair_p (sbf) && ly_number_p (ly_cdr (sbf)))
+      if (is_pair (sbf) && is_number (ly_cdr (sbf)))
          bff = ly_scm2double (ly_cdr (sbf));
 
       bb.curve_.control_[1][Y_AXIS] *= bff;
@@ -650,16 +650,16 @@ Slur::get_curve (Grob*me)
   int i = 0;
 
   SCM attach = me->get_property ("attachment");
-  if (!ly_pair_p (attach))
+  if (!is_pair (attach))
     attach = set_extremities (me);
 
   
   if (!get_grob_direction (me)
-      || ! ly_symbol_p (index_get_cell (attach, LEFT))
-      || ! ly_symbol_p (index_get_cell (attach, RIGHT)))
+      || ! is_symbol (index_get_cell (attach, LEFT))
+      || ! is_symbol (index_get_cell (attach, RIGHT)))
     set_extremities (me);
   
-  if (!ly_pair_p (me->get_property ("control-points")))
+  if (!is_pair (me->get_property ("control-points")))
     set_control_points (me);
 
   // set_control_points may suicide
index 9f91c7036731093b42a4ea782dbb6d5d5018058f..7c5c670313fdfc89ad10d03532d683b3a2857b59 100644 (file)
@@ -31,7 +31,7 @@ Spaceable_grob::add_rod (Grob *me , Grob * p, Real d)
   
   SCM mins = get_minimum_distances (me);
   SCM newdist = scm_make_real (d);
-  for (SCM s = mins; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = mins; is_pair (s); s = ly_cdr (s))
     {
       SCM dist = ly_car (s);
       if (ly_car (dist) == p->self_scm ())
@@ -70,7 +70,7 @@ Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength, bool expan
     
 #ifndef NDEBUG
   SCM mins = me->get_property ("ideal-distances");
-  for (SCM s = mins; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = mins; is_pair (s); s = ly_cdr (s))
     {
       Spring_smob * sp = unsmob_spring(ly_car (s));
       if (sp->other_ == p)
index a41b721a78c7be31296fa11f3684a2a23725179d..efeaf3524f2331ab4497da55efac8c1fbda7ecb3 100644 (file)
@@ -96,7 +96,7 @@ loose_column (Grob *l, Grob *c, Grob *r)
     such a borderline case.)
     
   */  
-  if (!ly_pair_p (lns) || !ly_pair_p (rns))
+  if (!is_pair (lns) || !is_pair (rns))
     return false;
 
   Item * l_neighbor = dynamic_cast<Item*>  (unsmob_grob (ly_car (lns)));
@@ -133,12 +133,12 @@ loose_column (Grob *l, Grob *c, Grob *r)
 
     in any case, we don't want to move bar lines.
    */
-  for (SCM e = c->get_property ("elements"); ly_pair_p (e); e = ly_cdr (e))
+  for (SCM e = c->get_property ("elements"); is_pair (e); e = ly_cdr (e))
     {
       Grob * g = unsmob_grob (ly_car (e));
       if (g && Break_align_interface::has_interface (g))
        {
-         for (SCM s = g->get_property ("elements"); ly_pair_p (s);
+         for (SCM s = g->get_property ("elements"); is_pair (s);
               s = ly_cdr (s))
            {
              Grob *h = unsmob_grob (ly_car (s));
@@ -177,10 +177,10 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array<Grob> *cols, Rational s
       if (loose_column (cols->elem (i-1), c, cols->elem (i+1)))
        {
          SCM lns = c->get_property ("left-neighbors");
-         lns = ly_pair_p (lns) ? ly_car (lns) : SCM_BOOL_F;
+         lns = is_pair (lns) ? ly_car (lns) : SCM_BOOL_F;
 
          SCM rns = c->get_property ("right-neighbors");
-         rns = ly_pair_p (rns) ? ly_car (rns) : SCM_BOOL_F;
+         rns = is_pair (rns) ? ly_car (rns) : SCM_BOOL_F;
 
          /*
            Either object can be non existent, if the score ends
@@ -206,7 +206,7 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array<Grob> *cols, Rational s
              Item *rc = dynamic_cast<Item*> (d == LEFT  ? c : next_door[RIGHT]);
 
              for (SCM s = lc->get_property ("spacing-wishes");
-                  ly_pair_p (s); s = ly_cdr (s))
+                  is_pair (s); s = ly_cdr (s))
                {
                  Grob *sp = unsmob_grob (ly_car (s));
                  if (Note_spacing::left_column (sp) != lc
@@ -273,7 +273,7 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols)
 
 
       SCM wishes=  cols[i]->get_property ("spacing-wishes");
-      for (SCM s =wishes; ly_pair_p (s); s = ly_cdr (s))
+      for (SCM s =wishes; is_pair (s); s = ly_cdr (s))
        {
          Item * wish = dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
 
@@ -305,7 +305,7 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols)
           */
          int maxrank = 0;
          SCM left_neighs = rc->get_property ("left-neighbors");
-         if (ly_pair_p (left_neighs)
+         if (is_pair (left_neighs)
              && unsmob_grob (ly_car (left_neighs)))
            {
              Item * it = dynamic_cast<Item*> (unsmob_grob (ly_car (left_neighs)));
@@ -322,7 +322,7 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols)
            }
        }
 
-      if (ly_pair_p (right_neighbors))
+      if (is_pair (right_neighbors))
        {
          cols[i]->set_property ("right-neighbors", right_neighbors);
        }
@@ -348,13 +348,13 @@ Spacing_spanner::set_implicit_neighbor_columns (Link_array<Grob> cols)
        sloppy with typnig left/right-neighbors should take list, but paper-column found instead.
        */
       SCM ln = cols[i] ->get_property ("left-neighbors");
-      if (!ly_pair_p (ln) && i ) 
+      if (!is_pair (ln) && i ) 
        {
          cols[i]->set_property ("left-neighbors", scm_cons (cols[i-1]->self_scm (), SCM_EOL));
        }
 
       SCM rn = cols[i] ->get_property ("right-neighbors");
-      if (!ly_pair_p (rn) && i < cols.size () - 1) 
+      if (!is_pair (rn) && i < cols.size () - 1) 
        {
          cols[i]->set_property ("right-neighbors", scm_cons (cols[i + 1]->self_scm (), SCM_EOL));
        }
@@ -569,7 +569,7 @@ Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real inc
     happens after the current note (this is set in the grob
     property SPACING-SEQUENCE.
   */
-  for (SCM s = seq; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = seq; is_pair (s); s = ly_cdr (s))
     {
       Grob * wish = unsmob_grob (ly_car (s));
 
@@ -733,7 +733,7 @@ Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r,Moment shor
   if (dt == Moment (0,0))
     {
       for (SCM s = l->get_property ("spacing-wishes");
-          ly_pair_p (s); s = ly_cdr (s))
+          is_pair (s); s = ly_cdr (s))
        {
          Item * spacing_grob = dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
 
index 0b473fe5df73db7258356b66dafc98b24f87426b..d2b8676744189f3308196fdd57be16dbfb825e69 100644 (file)
@@ -82,10 +82,10 @@ Span_arpeggio_engraver::stop_translation_timestep ()
       for (int i=0; i < arpeggios_.size (); i ++)
        {
          for (SCM s = arpeggios_[i]->get_property ("stems");
-              ly_pair_p (s); s = ly_cdr (s))
+              is_pair (s); s = ly_cdr (s))
            Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("stems"), ly_car (s));
          for (SCM s = arpeggios_[i]->get_property ("side-support-elements");
-              ly_pair_p (s); s = ly_cdr (s))
+              is_pair (s); s = ly_cdr (s))
            Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("side-support-elements"), ly_car (s));
 
          /*
index d9aa646a3b5bfd63ad8e7d0f86daffdf561b7681..5829cbcb2954e272ceeddd46b25f92ef12613814 100644 (file)
@@ -69,7 +69,7 @@ Span_bar_engraver::stop_translation_timestep ()
 
       SCM vissym =ly_symbol2scm ("break-visibility");
       SCM vis = bars_[0]->internal_get_property (vissym);        
-      if (ly_equal_p (spanbar_->internal_get_property (vissym), vis))
+      if (is_equal (spanbar_->internal_get_property (vissym), vis))
        spanbar_->internal_set_property (vissym, vis);
 
       typeset_grob (spanbar_);
index 95b1058f82439e6cad971abb53c28efe04915f1e..60ef61de0b6487224f433896d4662318acb392e2 100644 (file)
@@ -53,7 +53,7 @@ Span_bar::print (SCM smobbed_me)
 
   /* compute common refpoint of elements */
   Grob *refp = me;
-  for (SCM elts = first_elt; ly_pair_p (elts); elts = ly_cdr (elts))
+  for (SCM elts = first_elt; is_pair (elts); elts = ly_cdr (elts))
     {
       SCM smobbed_staff_bar = ly_car (elts);
       Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
@@ -65,7 +65,7 @@ Span_bar::print (SCM smobbed_me)
 
   /* glyph may not be a string, when ME is killed by Hara Kiri in
     between. */
-  if (!ly_string_p (glyph))
+  if (!is_string (glyph))
     return SCM_EOL;
   
   String glyph_string = ly_scm2string (glyph);
@@ -74,7 +74,7 @@ Span_bar::print (SCM smobbed_me)
   Stencil span_bar_mol;
 
   Interval prev_extent;
-  for (SCM elts = first_elt; ly_pair_p (elts); elts = ly_cdr (elts))
+  for (SCM elts = first_elt; is_pair (elts); elts = ly_cdr (elts))
     {
       SCM smobbed_staff_bar = ly_car (elts);
       Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
@@ -167,7 +167,7 @@ Span_bar::evaluate_empty (Grob*me)
   /* TODO: filter all hara-kiried out of ELEMENS list, and then
      optionally do suicide. Call this cleanage function from
      center_on_spanned_callback () as well. */
-  if (!ly_pair_p (me->get_property ("elements")))
+  if (!is_pair (me->get_property ("elements")))
     {
       me->suicide ();
     }
@@ -178,17 +178,17 @@ Span_bar::evaluate_glyph (Grob*me)
 {
   SCM gl = me->get_property ("glyph");
 
-  if (ly_string_p (gl))
+  if (is_string (gl))
     return ;
   
   for (SCM s = me->get_property ("elements");
-       !ly_string_p (gl) && ly_pair_p (s); s = ly_cdr (s))
+       !is_string (gl) && is_pair (s); s = ly_cdr (s))
     {
       gl = unsmob_grob (ly_car (s))
        ->get_property ("glyph");
     }
 
-  if (!ly_string_p (gl))
+  if (!is_string (gl))
     {
       me->suicide ();
       return;
index 4b7f244532643eabd6e25e219fa85426f4c85926..30283681dda7f029a1e10f8cce7165331cd4ccbe 100644 (file)
@@ -130,7 +130,7 @@ Staff_performer::new_instrument_string ()
   // mustn't ask Score for instrument: it will return piano!
   SCM minstr = get_property ("midiInstrument");
 
-  if (!ly_string_p (minstr)
+  if (!is_string (minstr)
       || ly_scm2string (minstr) == instrument_string_)
     return "";
 
index ef3bd0073a6cc7058a363551985b5f63fb330367..ecd9625c8b0ae500a3f4093c64cb6fa34ff67094 100644 (file)
@@ -101,7 +101,7 @@ Staff_spacing::bar_y_positions (Grob *bar_grob)
     {
       SCM glyph = bar_grob->get_property ("glyph");
       
-      String glyph_string = ly_string_p (glyph) ? ly_scm2string (glyph) : "";
+      String glyph_string = is_string (glyph) ? ly_scm2string (glyph) : "";
       if (glyph_string.left_string (1) == "|" || glyph_string.left_string (1) == ".")
        {
          SCM sz = Bar_line::get_staff_bar_size (bar_grob->self_scm ());
@@ -128,13 +128,13 @@ Staff_spacing::next_notes_correction (Grob *me, Grob * last_grob)
   Real max_corr =0.0;
 
   for (SCM s = me->get_property ("right-items");
-       ly_pair_p (s);  s = ly_cdr (s))
+       is_pair (s);  s = ly_cdr (s))
     {
       Grob * g = unsmob_grob (ly_car (s));
 
       max_corr = max_corr >?  next_note_correction (me, g,  bar_size);
       for (SCM t = g->get_property ("elements");
-          ly_pair_p (t); t  = ly_cdr (t))
+          is_pair (t); t  = ly_cdr (t))
        max_corr = max_corr >? next_note_correction (me, unsmob_grob (ly_car (t)), bar_size);
       
     }
@@ -152,7 +152,7 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
   Item * me_item  = dynamic_cast<Item*> (me);
     
   for (SCM s = me->get_property ("left-items");
-       ly_pair_p (s); s = ly_cdr (s))
+       is_pair (s); s = ly_cdr (s))
     {
       Grob * cand = unsmob_grob (ly_car (s));
       if (cand && Separation_item::has_interface (cand))
@@ -197,12 +197,12 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
   if (me_item->break_status_dir () == CENTER)
     {
       SCM nndef = scm_sloppy_assq (ly_symbol2scm ("next-note"), alist);
-      if (ly_pair_p (nndef))
+      if (is_pair (nndef))
        space_def = nndef;
     }
   
   
-  if (!ly_pair_p (space_def))
+  if (!is_pair (space_def))
     {
       programming_error ("Unknown prefatory spacing. "); 
       return; 
index 6359907d1c44250894901922596e5f651fc5431f..ecdcc3cd0edcdb03e9b2ab674a092467c228f8b7 100644 (file)
@@ -108,7 +108,7 @@ Staff_symbol_referencer::callback (SCM element_smob, SCM)
 
   SCM pos = me->get_property ("staff-position");
   Real off = 0.0;
-  if (ly_number_p (pos))
+  if (is_number (pos))
     {
       Real space = Staff_symbol_referencer::staff_space (me);
       off = ly_scm2double (pos) * space / 2.0;
index e8242d83fc0c5687e100f33531450dd8ccaffdd7..bda21ab5e4073c20a4af81161baba10cfeb0160e 100644 (file)
@@ -42,7 +42,7 @@ Staff_symbol::print (SCM smob)
   do
     {
       SCM width_scm = me->get_property ("width");
-      if (d == RIGHT && ly_number_p (width_scm))
+      if (d == RIGHT && is_number (width_scm))
        {
          /*
            don't multiply by Staff_symbol_referencer::staff_space (me),
@@ -95,7 +95,7 @@ int
 Staff_symbol::line_count (Grob*me) 
 {
   SCM c = me->get_property ("line-count");
-  if (ly_number_p (c))
+  if (is_number (c))
     return ly_scm2int (c);
   else
     return 0;
index 3ccf2ab485fc9a9f345e3864e2d4d286ed881a7e..96696bc7c14ef0cc5e1f2f1a6ef2b7a549507873 100644 (file)
@@ -45,7 +45,7 @@ Stanza_number_engraver::process_music ()
 {
   SCM stanza = get_property ("stanza");
   
-  if (ly_string_p (stanza) && stanza != last_stanza_)
+  if (is_string (stanza) && stanza != last_stanza_)
     {
       last_stanza_ = stanza;
       
index 0d36c981a076e636a6dc44f9aa0d8f3b57b26d8a..e5d49a40543671d7aa17d50e58ad9ac6364a4655 100644 (file)
@@ -83,7 +83,7 @@ Stem_engraver::acknowledge_grob (Grob_info i)
              int requested_type = ly_scm2int (tremolo_ev_->get_property ("tremolo-type"));
              SCM f = get_property ("tremoloFlags");
              if (!requested_type)
-               if (ly_number_p (f))
+               if (is_number (f))
                  requested_type = ly_scm2int (f);
                else
                  requested_type = 8; 
@@ -149,13 +149,13 @@ Stem_engraver::stop_translation_timestep ()
        toDO: junk these properties.
        */
       SCM prop = get_property ("stemLeftBeamCount");
-      if (ly_number_p (prop))
+      if (is_number (prop))
        {
          Stem::set_beaming (stem_,ly_scm2int (prop),LEFT);
          daddy_context_->unset_property (ly_symbol2scm ("stemLeftBeamCount"));
        }
       prop = get_property ("stemRightBeamCount");
-      if (ly_number_p (prop))
+      if (is_number (prop))
        {
          Stem::set_beaming (stem_,ly_scm2int (prop), RIGHT);
          daddy_context_->unset_property (ly_symbol2scm ("stemRightBeamCount"));
index fda0f1ec9ac3e17286c7dca930f5722bc714df3a..30580422f3a0b4bc13137e45379a0068520a160e 100644 (file)
@@ -92,7 +92,7 @@ Stem_tremolo::raw_stencil (Grob *me)
   
   int tremolo_flags = 0;
   SCM s = me->get_property ("flag-count");
-  if (ly_number_p (s))
+  if (is_number (s))
     tremolo_flags = ly_scm2int (s);
 
   if (!tremolo_flags)
@@ -150,7 +150,7 @@ Stem_tremolo::print (SCM grob)
 
   Real beamthickness = 0.0;
   SCM sbt = (beam) ? beam->get_property ("thickness") : SCM_EOL ;
-  if (ly_number_p (sbt))
+  if (is_number (sbt))
     {
       beamthickness = ly_scm2double (sbt) * ss;
     }
index 72b52a3e7c32bc3879f1ac5e440f5a410a42f270..7a07ac749b366c3d1549c57a0e56e9ed09ae57f5 100644 (file)
@@ -40,7 +40,7 @@ Stem::set_beaming (Grob*me, int beam_count,  Direction d)
 {
   SCM pair = me->get_property ("beaming");
   
-  if (!ly_pair_p (pair))
+  if (!is_pair (pair))
     {
       pair = scm_cons (SCM_EOL, SCM_EOL);
       me->set_property ("beaming", pair);
@@ -83,7 +83,7 @@ Stem::stem_end_position (Grob*me)
 {
   SCM p =me->get_property ("stem-end-position");
   Real pos;
-  if (!ly_number_p (p))
+  if (!is_number (p))
     {
       pos = get_default_stem_end_position (me);
       me->set_property ("stem-end-position", scm_make_real (pos));
@@ -189,7 +189,7 @@ Stem::extremal_heads (Grob*me)
   Drul_array<Grob *> exthead;
   exthead[LEFT] = exthead[RIGHT] =0;
   
-  for (SCM s = me->get_property ("note-heads"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("note-heads"); is_pair (s); s = ly_cdr (s))
     {
       Grob * n = unsmob_grob (ly_car (s));
 
@@ -222,7 +222,7 @@ Array<int>
 Stem::note_head_positions (Grob *me)
 {
   Array<int> ps ;
-  for (SCM s = me->get_property ("note-heads"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("note-heads"); is_pair (s); s = ly_cdr (s))
     {
       Grob * n = unsmob_grob (ly_car (s));
       int p = Staff_symbol_referencer::get_rounded_position (n);
@@ -289,14 +289,14 @@ Stem::get_default_stem_end_position (Grob*me)
   
   Real length = 7;             // WARNING: IN HALF SPACES
   SCM scm_len = me->get_property ("length");
-  if (ly_number_p (scm_len))
+  if (is_number (scm_len))
     {
       length = ly_scm2double (scm_len);
     }
   else
     {
       s = me->get_property ("lengths");
-      if (ly_pair_p (s))
+      if (is_pair (s))
        {
          length = 2* ly_scm2double (robust_list_ref (durlog -2, s));
        }
@@ -317,7 +317,7 @@ Stem::get_default_stem_end_position (Grob*me)
   if (dir * head_positions (me)[dir] >= 0)
     {
       SCM sshorten = me->get_property ("stem-shorten");
-      SCM scm_shorten = ly_pair_p (sshorten) ?
+      SCM scm_shorten = is_pair (sshorten) ?
        robust_list_ref ((duration_log (me) - 2) >? 0, sshorten): SCM_EOL;
       Real shorten = 2* robust_scm2double (scm_shorten,0);
       
@@ -429,7 +429,7 @@ int
 Stem::duration_log (Grob*me) 
 {
   SCM s = me->get_property ("duration-log");
-  return (ly_number_p (s)) ? ly_scm2int (s) : 2;
+  return (is_number (s)) ? ly_scm2int (s) : 2;
 }
 
 void
@@ -576,7 +576,7 @@ Stem::flag (Grob*me)
   String flag_style;
   
   SCM flag_style_scm = me->get_property ("flag-style");
-  if (ly_symbol_p (flag_style_scm))
+  if (is_symbol (flag_style_scm))
     {
       flag_style = ly_symbol2string (flag_style_scm);
     }
@@ -649,7 +649,7 @@ Stem::flag (Grob*me)
     }
 
   SCM stroke_style_scm = me->get_property ("stroke-style");
-  if (ly_string_p (stroke_style_scm))
+  if (is_string (stroke_style_scm))
     {
       String stroke_style = ly_scm2string (stroke_style_scm);
       if (!stroke_style.is_empty ())
@@ -824,7 +824,7 @@ Stem::get_stem_info (Grob *me)
 {
   /* Return cached info if available */
   SCM scm_info = me->get_property ("stem-info");
-  if (!ly_pair_p (scm_info))
+  if (!is_pair (scm_info))
     {
       calc_stem_info (me);
       scm_info = me->get_property ("stem-info");
index 4b9fb23e2a65c7b704a54bc178361e7948b41d76..44beeb460057a534cb1e5130cc00db1a37c00074 100644 (file)
@@ -40,7 +40,7 @@ LY_DEFINE (ly_translate_stencil_axis, "ly:stencil-translate-axis",
 {
   Stencil *s = unsmob_stencil (stil);
   SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
-  SCM_ASSERT_TYPE (ly_number_p (amount), amount, SCM_ARG2, __FUNCTION__, "number pair");
+  SCM_ASSERT_TYPE (is_number (amount), amount, SCM_ARG2, __FUNCTION__, "number pair");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
 
   SCM new_s = s->smobbed_copy ();
@@ -106,13 +106,13 @@ LY_DEFINE (ly_stencil_moved_to_edge, "ly:stencil-moved-to-edge",
   Real p = 0.0;
   if (padding != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
+      SCM_ASSERT_TYPE (is_number (padding), padding, SCM_ARG5, __FUNCTION__, "number");
       p = ly_scm2double (padding);
     }
   Real m = 0.0;
   if (minimum != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
+      SCM_ASSERT_TYPE (is_number (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
       m = ly_scm2double (minimum);
     }
 
@@ -151,13 +151,13 @@ LY_DEFINE (ly_stencil_combine_at_edge, "ly:stencil-combine-at-edge",
   Real p = 0.0;
   if (padding != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
+      SCM_ASSERT_TYPE (is_number (padding), padding, SCM_ARG5, __FUNCTION__, "number");
       p = ly_scm2double (padding);
     }
   Real m = 0.0;
   if (minimum != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
+      SCM_ASSERT_TYPE (is_number (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
       m = ly_scm2double (minimum);
     }
 
@@ -219,7 +219,7 @@ LY_DEFINE (ly_align_to_x, "ly:stencil-align-to!",
 {
   SCM_ASSERT_TYPE (unsmob_stencil (stil), stil, SCM_ARG1, __FUNCTION__, "stencil");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
-  SCM_ASSERT_TYPE (ly_number_p (dir), dir, SCM_ARG3, __FUNCTION__, "number");
+  SCM_ASSERT_TYPE (is_number (dir), dir, SCM_ARG3, __FUNCTION__, "number");
 
   unsmob_stencil (stil)->align_to ((Axis)ly_scm2int (axis),
                                   ly_scm2double (dir));
index 6ba60c6b39ea861603a24982621c9140dd273ed4..7085615b567ecc9988c8639cb1a6ed0a45b0a6f4 100644 (file)
@@ -42,7 +42,7 @@ Sustain_pedal::print (SCM smob)
   
   Stencil mol;
   SCM glyph = e->get_property ("text");
-  if (!ly_string_p (glyph))
+  if (!is_string (glyph))
     return mol.smobbed_copy ();
   
   String text = ly_scm2string (glyph);
index 22e76fb6bf8bc05187dad48d1df2e0d66061db6d..9b0f93fe06b78a7e115f92b8725e4f2384eec233 100644 (file)
@@ -48,11 +48,11 @@ System_start_delimiter_engraver::acknowledge_grob (Grob_info inf)
       /*
        UGH UGH
        */
-      if (ly_string_p (gl) && ly_equal_p (gl, scm_makfrom0str  ("brace"))
-         && ly_string_p (my_gl) && ly_equal_p (my_gl, scm_makfrom0str  ("bracket")))
+      if (is_string (gl) && is_equal (gl, scm_makfrom0str  ("brace"))
+         && is_string (my_gl) && is_equal (my_gl, scm_makfrom0str  ("bracket")))
        inf.grob_->translate_axis (-0.8, X_AXIS); // ugh
-      else if (ly_string_p (gl) && ly_equal_p (gl, scm_makfrom0str  ("bracket"))
-              && ly_string_p (my_gl) && ly_equal_p (my_gl, scm_makfrom0str  ("bracket")))
+      else if (is_string (gl) && is_equal (gl, scm_makfrom0str  ("bracket"))
+              && is_string (my_gl) && is_equal (my_gl, scm_makfrom0str  ("bracket")))
        {
          inf.grob_->translate_axis ( -0.8, X_AXIS); // ugh
          inf.grob_->set_property ("arch-height",
index 87be0807b495df920596e3525b698903da087bc9..82133825b89b4d11b4ee505d8e4614b5f693b6a9 100644 (file)
@@ -75,7 +75,7 @@ System_start_delimiter::after_line_breaking (SCM smob)
 {
   Grob * me = unsmob_grob (smob);
   SCM   gl = me->get_property ("glyph");
-  if (ly_equal_p (gl,scm_makfrom0str ("bar-line")))
+  if (is_equal (gl,scm_makfrom0str ("bar-line")))
     {
       int count = 0;
 
@@ -84,7 +84,7 @@ System_start_delimiter::after_line_breaking (SCM smob)
       */
       SCM elts = me->get_property ("elements");
       Grob *common = common_refpoint_of_list (elts, me, Y_AXIS);
-      for (SCM s = elts; ly_pair_p (s); s = ly_cdr (s))
+      for (SCM s = elts; is_pair (s); s = ly_cdr (s))
        {
          Interval v = unsmob_grob (ly_car (s))->extent (common, Y_AXIS);
 
@@ -109,7 +109,7 @@ System_start_delimiter::print (SCM smob)
   Grob * me = unsmob_grob (smob);
 
   SCM s = me->get_property ("glyph");
-  if (!ly_string_p (s))
+  if (!is_string (s))
     return SCM_EOL;
   SCM gsym = scm_string_to_symbol (s) ;
   
index 0c1605d741a6f5f2c602725c04cfa4ef9c1c7764..b13d4d08665cf598c58ac6387e7b3f479b8c08ad 100644 (file)
@@ -40,7 +40,7 @@ System::spanner_count () const
 {
   int k =0;
   for (SCM s = get_property ("all-elements");
-       ly_pair_p (s); s = ly_cdr (s))
+       is_pair (s); s = ly_cdr (s))
     {
       if (dynamic_cast<Spanner*> (unsmob_grob (ly_car (s))))
        k++;
@@ -112,7 +112,7 @@ System::typeset_grob (Grob * elem)
 static void
 fixup_refpoints (SCM s)
 {
-  for (; ly_pair_p (s); s = ly_cdr (s))
+  for (; is_pair (s); s = ly_cdr (s))
     {
       Grob::fixup_refpoint (ly_car (s));
     }
@@ -121,7 +121,7 @@ fixup_refpoints (SCM s)
 SCM
 System::get_lines ()
 {
-  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); is_pair (s); s = ly_cdr (s))
     {
       Grob *g = unsmob_grob (ly_car (s));
       if (g->internal_has_interface (ly_symbol2scm ("only-prebreak-interface")))
@@ -149,7 +149,7 @@ System::get_lines ()
     {
       Grob *se = broken_intos_[i];
       SCM all = se->get_property ("all-elements");
-      for (SCM s = all; ly_pair_p (s); s = ly_cdr (s))
+      for (SCM s = all; is_pair (s); s = ly_cdr (s))
        fixup_refpoint (ly_car (s));
       count += scm_ilength (all);
     }
@@ -159,7 +159,7 @@ System::get_lines ()
    */
   fixup_refpoints (get_property ("all-elements"));
 
-  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); is_pair (s); s = ly_cdr (s))
     unsmob_grob (ly_car (s))->handle_broken_dependencies ();
   handle_broken_dependencies ();
 
@@ -221,7 +221,7 @@ set_loose_columns (System* which, Column_x_positions const *posns)
       do
        {
          SCM between = loose->get_property ("between-cols");
-         if (!ly_pair_p (between))
+         if (!is_pair (between))
            break;
 
 
@@ -316,7 +316,7 @@ System::add_column (Paper_column*p)
 {
   Grob *me = this;
   SCM cs = me->get_property ("columns");
-  Grob * prev =  ly_pair_p (cs) ? unsmob_grob (ly_car (cs)) : 0;
+  Grob * prev =  is_pair (cs) ? unsmob_grob (ly_car (cs)) : 0;
 
   p->rank_ = prev ? Paper_column::get_rank (prev) + 1 : 0; 
 
@@ -328,30 +328,30 @@ System::add_column (Paper_column*p)
 void
 System::pre_processing ()
 {
-  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); is_pair (s); s = ly_cdr (s))
     unsmob_grob (ly_car (s))->discretionary_processing ();
 
   if (verbose_global_b)
     progress_indication (_f ("Grob count %d",  element_count ()));
 
   
-  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); is_pair (s); s = ly_cdr (s))
     unsmob_grob (ly_car (s))->handle_prebroken_dependencies ();
   
   fixup_refpoints (get_property ("all-elements"));
   
-  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); is_pair (s); s = ly_cdr (s))
     {
       Grob* sc = unsmob_grob (ly_car (s));
       sc->calculate_dependencies (PRECALCED, PRECALCING, ly_symbol2scm ("before-line-breaking-callback"));
     }
   
   progress_indication ("\n" + _ ("Calculating line breaks...") + " ");
-  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); is_pair (s); s = ly_cdr (s))
     {
       Grob * e = unsmob_grob (ly_car (s));
       SCM proc = e->get_property ("spacing-procedure");
-      if (ly_procedure_p (proc))
+      if (is_procedure (proc))
        scm_call_1 (proc, e->self_scm ());
     }
 }
@@ -359,7 +359,7 @@ System::pre_processing ()
 void
 System::post_processing ()
 {
-  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); is_pair (s); s = ly_cdr (s))
     {
       Grob *g = unsmob_grob (ly_car (s));
       g->calculate_dependencies (POSTCALCED, POSTCALCING,
@@ -379,7 +379,7 @@ System::post_processing ()
   all = uniquify_list (all);
 
   this->get_stencil ();
-  for (SCM s = all; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = all; is_pair (s); s = ly_cdr (s))
     {
       Grob *g = unsmob_grob (ly_car (s));
       g->get_stencil ();
@@ -404,7 +404,7 @@ System::get_line ()
   SCM all = get_property ("all-elements");
   
   for (int i = LAYER_COUNT; i--;)
-    for (SCM s = all; ly_pair_p (s); s = ly_cdr (s))
+    for (SCM s = all; is_pair (s); s = ly_cdr (s))
       {
        Grob *g = unsmob_grob (ly_car (s));
        Stencil *stil = g->get_stencil ();
@@ -437,7 +437,7 @@ System::get_line ()
       
       SCM between = ly_symbol2scm ("between-system-string");
       SCM inter = g->internal_get_property (between);
-      if (ly_string_p (inter))
+      if (is_string (inter))
        stencils = scm_cons (scm_cons (between, inter), stencils);
     }
 
@@ -459,13 +459,13 @@ System::broken_col_range (Item const*l, Item const*r) const
   r = r->get_column ();
   SCM s = get_property ("columns");
 
-  while (ly_pair_p (s) && ly_car (s) != r->self_scm ())
+  while (is_pair (s) && ly_car (s) != r->self_scm ())
     s = ly_cdr (s);
 
-  if (ly_pair_p (s))
+  if (is_pair (s))
     s = ly_cdr (s);
 
-  while (ly_pair_p (s) && ly_car (s) != l->self_scm ())
+  while (is_pair (s) && ly_car (s) != l->self_scm ())
     {
       Paper_column*c = dynamic_cast<Paper_column*> (unsmob_grob (ly_car (s)));
       if (Item::is_breakable (c) && !c->system_)
index b1cb9dbcc07c70eda1ddf67f0aa7c6960a9b8328..61bae836a49897e990f16f892614d8ea1b1c4f50 100644 (file)
@@ -81,7 +81,7 @@ Tab_note_heads_engraver::process_music ()
       Music * tabstring_event=0;
 
       for (SCM s =event->get_property ("articulations");
-          !tabstring_event && ly_pair_p (s); s = ly_cdr (s))
+          !tabstring_event && is_pair (s); s = ly_cdr (s))
        {
          Music * art = unsmob_music (ly_car (s));
 
@@ -131,7 +131,7 @@ Tab_note_heads_engraver::process_music ()
       SCM scm_pitch = event->get_property ("pitch");
       SCM proc      = get_property ("tablatureFormat");
       SCM min_fret_scm = get_property ("minimumFret");
-      int min_fret = ly_number_p (min_fret_scm) ? ly_scm2int (min_fret_scm) : 0;
+      int min_fret = is_number (min_fret_scm) ? ly_scm2int (min_fret_scm) : 0;
 
       while (!string_found)
        {
index 2da7fbe8e5c2d360dd6910b63325e4aff53a2dff..c7f87db6f84a58b1f522de863c9ba8f7f45b906d 100644 (file)
@@ -93,7 +93,7 @@ Text_engraver::process_acknowledged_grobs ()
       // Hmm
       int priority = 200;
       SCM s = text->get_property ("script-priority");
-      if (ly_number_p (s))
+      if (is_number (s))
        priority = ly_scm2int (s);
       
       /* see script-engraver.cc */
index c767c2d5ccdf5928846aa9f9d7755c9549563969..3241dca091237481d03786fa8e548de6e67f798c 100644 (file)
 #include "paper-def.hh"
 #include "scaled-font-metric.hh"
 
-MAKE_SCHEME_CALLBACK (Text_item, interpret_markup, 3)
+MAKE_SCHEME_CALLBACK (Text_item, interpret_string, 4)
 SCM
-Text_item::interpret_markup (SCM paper, SCM props, SCM markup)
+Text_item::interpret_string (SCM paper, SCM props, SCM encoding, SCM markup)
 {
-  if (ly_string_p (markup))
+  Paper_def *pap = unsmob_paper (paper);
+  
+  SCM_ASSERT_TYPE(pap, paper, SCM_ARG1, __FUNCTION__, "Paper definition");
+  SCM_ASSERT_TYPE(is_string (markup), markup, SCM_ARG3, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE(encoding == SCM_EOL
+                 || is_symbol (encoding), encoding, SCM_ARG2, __FUNCTION__, "symbol");
+  
+  String str = ly_scm2string (markup);
+  Font_metric *fm = select_encoded_font (pap, props, encoding);
+  SCM lst = SCM_EOL;      
+  Box b;
+  if (Modified_font_metric* mf = dynamic_cast<Modified_font_metric*> (fm))
     {
-      String str = ly_scm2string (markup);
-      
-      Paper_def *pap = unsmob_paper (paper);
-      Font_metric *fm = select_font (pap, props);
-      SCM lst = SCM_EOL;      
-      Box b;
-      if (Modified_font_metric* mf = dynamic_cast<Modified_font_metric*> (fm))
-       {
-         lst = scm_list_3 (ly_symbol2scm ("text"),
-                           mf->self_scm (),
-                           markup);
+      lst = scm_list_3 (ly_symbol2scm ("text"),
+                       mf->self_scm (),
+                       markup);
        
-         b = mf->text_dimension (str);
-       }
-      else
-       {
-         /* ARGH. */
-         programming_error ("Must have Modified_font_metric for text.");
-       }
+      b = mf->text_dimension (str);
+    }
+  else
+    {
+      /* ARGH. */
+      programming_error ("Must have Modified_font_metric for text.");
+    }
       
-      return Stencil (b, lst).smobbed_copy ();
+  return Stencil (b, lst).smobbed_copy ();
+}
+
+
+MAKE_SCHEME_CALLBACK (Text_item, interpret_markup, 3)
+SCM
+Text_item::interpret_markup (SCM paper, SCM props, SCM markup)
+{
+  if (is_string (markup))
+    {
+      return interpret_string (paper, props, markup, SCM_EOL);
     }
-  else if (ly_pair_p (markup))
+  else if (is_pair (markup))
     {
       SCM func = ly_car (markup);
       SCM args = ly_cdr (markup);
@@ -75,8 +88,8 @@ bool
 Text_item::markup_p (SCM x)
 {
   return
-    ly_string_p (x) ||
-    (ly_pair_p (x)
+    is_string (x) ||
+    (is_pair (x)
      && SCM_BOOL_F != scm_object_property (ly_car (x), ly_symbol2scm ("markup-signature")));
 }
 
index 41bef9c54c4c29738c9dbc1cb1056e7dc561d91e..cd41ce6f37ad93d7d9ee2b1667bc54880adf65bd 100644 (file)
@@ -80,7 +80,7 @@ Text_spanner::print (SCM smob)
   SCM properties = Font_interface::text_font_alist_chain (me);
   SCM edge_text = me->get_property ("edge-text");
   Drul_array<Stencil> edge;
-  if (ly_pair_p (edge_text))
+  if (is_pair (edge_text))
     {
       Direction d = LEFT;
       do
index 09ccdd37d5ed9a86430ca64cf8639988b53c11e7..b1043a5acb0653a22286f4c6b49a74680237a419 100644 (file)
@@ -134,7 +134,7 @@ Tex_font_metric::name_to_index (String s) const
   SCM sym = ly_symbol2scm (s.to_str0 ());
 
   SCM idx = scm_hash_ref (encoding_table_, sym, SCM_BOOL_F);
-  if (ly_char_p (idx))
+  if (is_char (idx))
     {
       return (unsigned char) ly_scm2char (idx);
     }
index 9aabfa887e41ef5d1f5c9a0e8d2b7efec1afa68c..69b69599ccdae4aa3521f09cfdf60c8f2f989762 100644 (file)
@@ -94,7 +94,7 @@ Tie_engraver::acknowledge_grob (Grob_info i)
            maybe should check positions too.
           */
          if (right_mus && left_mus
-             && ly_equal_p (right_mus->get_property ("pitch"),
+             && is_equal (right_mus->get_property ("pitch"),
                             left_mus->get_property ("pitch")))
            {
              Grob * p = make_spanner ("Tie");
index eeb0a37ec39ff9c2f383f25d6d616d2dafc6f1e3..cbb38819e50dd275e18cf93215dc362472af4d8b 100644 (file)
@@ -74,7 +74,7 @@ Tie_performer::acknowledge_audio_element (Audio_element_info inf)
          Music * left_mus = heads_to_tie_[i].event_;
 
          if (right_mus && left_mus
-             && ly_equal_p (right_mus->get_property ("pitch"),
+             && is_equal (right_mus->get_property ("pitch"),
                             left_mus->get_property ("pitch")))
            {
              an->tie_to (th);
index 45fa3459b2bb049749aaafaa1e5358ac69382237..0fc35b67056f2c20f97113a454c7241a6db5d36a 100644 (file)
@@ -59,7 +59,7 @@ Tie::head (Grob*me, Direction d)
 {
   SCM c = me->get_property ("head-pair");
 
-  if (ly_pair_p (c))
+  if (is_pair (c))
     return unsmob_grob (index_get_cell (c, d));
   else
     return 0;
@@ -326,13 +326,13 @@ Tie::print (SCM smob)
   Grob*me = unsmob_grob (smob);
 
   SCM cp = me->get_property ("control-points");
-  if (!ly_pair_p (cp))         // list is more accurate
+  if (!is_pair (cp))           // list is more accurate
     {
       cp = get_control_points (smob);
       me->set_property ("control-points", cp);
     }
 
-  if (!ly_pair_p (cp))
+  if (!is_pair (cp))
     return Stencil ().smobbed_copy ();
   
   Real thick
index dcbad886281a2729f0fd3abf400df55550072eb5..be062c5fda5c273bfa16b15747e2743b34ef2cbf 100644 (file)
@@ -44,7 +44,7 @@ Time_signature_engraver::process_music ()
   SCM fr= get_property ("timeSignatureFraction");
   if (!time_signature_
       && last_time_fraction_ != fr
-      && ly_pair_p (fr))
+      && is_pair (fr))
     {
       int den = ly_scm2int (ly_cdr (fr));
       if (den != (1 << intlog2 (den)))
index 4cc3a96b9674fe6044d697238c22da7c2cac5a32..46e42cb8b57f55449d72f2d54c24e0262269094b 100644 (file)
@@ -44,7 +44,7 @@ void
 Time_signature_performer::create_audio_elements ()
 {
   SCM fr = get_property ("timeSignatureFraction");
-  if (ly_pair_p (fr) && !ly_equal_p (fr, prev_fraction_))
+  if (is_pair (fr) && !is_equal (fr, prev_fraction_))
     {
       prev_fraction_ = fr;
       int b = ly_scm2int (ly_car (fr));
index bef6078c75b5f3a3cb644f67df497c0b71bc8169..8f7f7acfb62da86921733e65aa71a7b52c168d2c 100644 (file)
@@ -34,14 +34,14 @@ Time_signature::print (SCM smob)
   SCM frac = me->get_property ("fraction");
   int n = 4;
   int d = 4;
-  if (ly_pair_p (frac))
+  if (is_pair (frac))
     {
       n = ly_scm2int (ly_car (frac));
       d = ly_scm2int (ly_cdr (frac));
     }
 
   Stencil m;
-  if (ly_symbol_p (st))
+  if (is_symbol (st))
     {
       String style (ly_scm2string (scm_symbol_to_string (st)));
       if (style[0]=='1')
index 0a500dd86979c2c3220463e3b34836c3f92c2d05..d366a7a088804def188c72fd9a36fabc35179710 100644 (file)
@@ -45,7 +45,7 @@ Timing_engraver::initialize ()
   Moment now = now_mom ();
   
   /* Set the first bar of the score? */
-  if (!ly_string_p (which))
+  if (!is_string (which))
     which = (now.main_part_ || now.main_part_ == last_moment_.main_part_)
       ? SCM_EOL : scm_makfrom0str ("|");
 
@@ -63,7 +63,7 @@ Timing_engraver::start_translation_timestep ()
   SCM which = get_property ("whichBar");
 
   /* Set the first bar of the score? */
-  if (!ly_string_p (which))
+  if (!is_string (which))
     which = SCM_EOL;
 
   Moment mp = measure_position ();
@@ -77,7 +77,7 @@ Timing_engraver::start_translation_timestep ()
        ->set_property ("measure-length", mlen.smobbed_copy ()); 
     }
   
-  if (!ly_string_p (which) && to_boolean (automatic_bars))
+  if (!is_string (which) && to_boolean (automatic_bars))
     {
       SCM always = get_property ("barAlways");
 
index e7f56fc63c5d08eece335c5e7eb82fcf30cd05d4..a52e2eba280a0ca315d9db3665ce787ef83a1155 100644 (file)
@@ -133,7 +133,7 @@ Timing_translator::start_translation_timestep ()
   
   SCM barn = get_property ("currentBarNumber");
   int b = 0;
-  if (ly_number_p (barn))
+  if (is_number (barn))
     {
       b = ly_scm2int (barn);
     }
index eca1adefd23cb1fdf1dbc2c10fa5757725cf3ee2..557d986f9059106145b6271e0735a8798065be89 100644 (file)
@@ -22,7 +22,7 @@ LY_DEFINE (get_all_translators,"ly:get-all-translators", 0, 0, 0,  (),
 {
   SCM l = global_translator_dict ?  global_translator_dict->to_alist () : SCM_EOL;
 
-  for (SCM s =l; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s =l; is_pair (s); s = ly_cdr (s))
     {
       scm_set_car_x (s, ly_cdar (s));
     }
index 6ea96d4efaf3cdc2e59a3a54c89a72f4ea4259d0..d2ff5652907054c9f125a1e566726d1cba12a8f7 100644 (file)
@@ -29,7 +29,7 @@ Translator_group::get_daddy_translator () const
 void
 translator_each (SCM list, Translator_method method)
 {
-  for (SCM p = list; ly_pair_p (p); p = ly_cdr (p))
+  for (SCM p = list; is_pair (p); p = ly_cdr (p))
     (unsmob_translator (ly_car (p))->*method) ();
 }
 
@@ -48,7 +48,7 @@ translator_accepts_any_of (Translator*tr, SCM ifaces)
   SCM ack_ifs = scm_assoc (ly_symbol2scm ("events-accepted"),
                           tr->translator_description ());
   ack_ifs = ly_cdr (ack_ifs);
-  for (SCM s = ifaces; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = ifaces; is_pair (s); s = ly_cdr (s))
     if (scm_c_memq (ly_car (s), ack_ifs) != SCM_BOOL_F)
       return true;
   return false;
@@ -58,7 +58,7 @@ SCM
 find_accept_translators (SCM gravlist, SCM ifaces)
 {
   SCM l = SCM_EOL;
-  for (SCM s = gravlist; ly_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = gravlist; is_pair (s);  s = ly_cdr (s))
     {
       Translator* tr = unsmob_translator (ly_car (s));
       if (translator_accepts_any_of (tr, ifaces))
@@ -76,7 +76,7 @@ Translator_group::try_music (Music* m)
   SCM name = scm_sloppy_assq (ly_symbol2scm ("name"),
                              m->get_property_alist (false));
 
-  if (!ly_pair_p (name))
+  if (!is_pair (name))
     return false;
 
   name = ly_cdr (name);
@@ -88,7 +88,7 @@ Translator_group::try_music (Music* m)
       scm_hashq_set_x (tab, name, accept_list);
     }
 
-  for (SCM p = accept_list; ly_pair_p (p); p = ly_cdr (p))
+  for (SCM p = accept_list; is_pair (p); p = ly_cdr (p))
     {
       Translator * t = unsmob_translator (ly_car (p));
       if (t && t->try_music (m))
@@ -101,7 +101,7 @@ SCM
 names_to_translators (SCM namelist, Context*tg)
 {
   SCM l = SCM_EOL;
-  for (SCM s = namelist; ly_pair_p (s) ; s = ly_cdr (s))
+  for (SCM s = namelist; is_pair (s) ; s = ly_cdr (s))
     {
       Translator * t = get_translator (ly_car (s));
       if (!t)
@@ -144,7 +144,7 @@ recurse_over_translators (Context * c, Translator_method ptr, Direction dir)
       (tg->*ptr) ();
     }
 
-  for (SCM s = c->context_list_ ; ly_pair_p (s);
+  for (SCM s = c->context_list_ ; is_pair (s);
        s =ly_cdr (s))
     {
       recurse_over_translators (unsmob_context (ly_car (s)), ptr, dir);
index 0ccb82c897050a2537757adefdcdcfdbb7bae11d..7a278668d6ce59d72654975532125dadeefe7101 100644 (file)
@@ -32,7 +32,7 @@ void
 execute_pushpop_property (Context * trg,
                          SCM prop, SCM eltprop, SCM val)
 {
-  if (ly_symbol_p (prop) && ly_symbol_p (eltprop))
+  if (is_symbol (prop) && is_symbol (eltprop))
     {
       if (val != SCM_UNDEFINED)
        {
@@ -54,7 +54,7 @@ execute_pushpop_property (Context * trg,
          else
            prev = trg->internal_get_property (prop);
          
-         if (!ly_pair_p (prev))
+         if (!is_pair (prev))
            {
              programming_error ("Grob definition should be cons.");
              return ;
@@ -62,7 +62,7 @@ execute_pushpop_property (Context * trg,
 
          SCM prev_alist = ly_car (prev);
          
-         if (ly_pair_p (prev_alist) || prev_alist == SCM_EOL)
+         if (is_pair (prev_alist) || prev_alist == SCM_EOL)
            {
              bool ok = type_check_assignment (eltprop, val, ly_symbol2scm ("backend-type?"));
 
@@ -88,7 +88,7 @@ execute_pushpop_property (Context * trg,
 
          while (prev_alist != daddy)
            {
-             if (ly_equal_p (ly_caar (prev_alist), eltprop))
+             if (is_equal (ly_caar (prev_alist), eltprop))
                {
                  prev_alist = ly_cdr (prev_alist);
                  break ;
@@ -124,7 +124,7 @@ void
 apply_property_operations (Context *tg, SCM pre_init_ops)
 {
   SCM correct_order = scm_reverse (pre_init_ops);
-  for (SCM s = correct_order; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = correct_order; is_pair (s); s = ly_cdr (s))
     {
       SCM entry = ly_car (s);
       SCM type = ly_car (entry);
@@ -133,7 +133,7 @@ apply_property_operations (Context *tg, SCM pre_init_ops)
       if (type == ly_symbol2scm ("push") || type == ly_symbol2scm ("poppush"))
        {
          SCM val = ly_cddr (entry);
-         val = ly_pair_p (val) ? ly_car (val) : SCM_UNDEFINED;
+         val = is_pair (val) ? ly_car (val) : SCM_UNDEFINED;
 
          execute_pushpop_property (tg, ly_car (entry), ly_cadr (entry), val);
        }
@@ -151,7 +151,7 @@ apply_property_operations (Context *tg, SCM pre_init_ops)
 SCM
 updated_grob_properties (Context * tg, SCM sym)
 {
-  assert (ly_symbol_p (sym));
+  assert (is_symbol (sym));
   
   tg = tg->where_defined (sym);
   if (!tg)
@@ -164,7 +164,7 @@ updated_grob_properties (Context * tg, SCM sym)
   
   SCM props  = tg->internal_get_property (sym);
 
-  if (!ly_pair_p (props))
+  if (!is_pair (props))
     {
       programming_error ("grob props not a pair?");
       return SCM_EOL;
index abca879039d4935d599125ed34b330ee91c8bda2..863071cf9cf94b4d88892a3373119e6e6d5479c1 100644 (file)
@@ -114,7 +114,7 @@ Tuplet_bracket::print (SCM smob)
     SCM lp = me->get_property ("left-position");
     SCM rp = me->get_property ("right-position");  
 
-    if (!ly_number_p (rp) || !ly_number_p (lp))
+    if (!is_number (rp) || !is_number (lp))
       after_line_breaking (smob);
   }
   
@@ -133,7 +133,7 @@ Tuplet_bracket::print (SCM smob)
     Fixme: the type of this prop is sucky.
    */
   SCM bracket = me->get_property ("bracket-visibility");
-  if (ly_boolean_p (bracket))
+  if (is_boolean (bracket))
     {
       bracket_visibility = ly_scm2bool (bracket);
     }
@@ -141,7 +141,7 @@ Tuplet_bracket::print (SCM smob)
     bracket_visibility = !par_beam;
 
   SCM numb = me->get_property ("number-visibility");  
-  if (ly_boolean_p (numb))
+  if (is_boolean (numb))
     {
       number_visibility = ly_scm2bool (numb);
     }
@@ -170,7 +170,7 @@ Tuplet_bracket::print (SCM smob)
 
   Paper_def *pap = me->get_paper ();
   Stencil num;
- if (ly_string_p (number) && number_visibility)
+ if (is_string (number) && number_visibility)
     {
       SCM properties = Font_interface::text_font_alist_chain (me);
       SCM snum = Text_item::interpret_markup (pap->self_scm (), properties, number);
@@ -487,15 +487,15 @@ Tuplet_bracket::after_line_breaking (SCM smob)
   SCM lp =  me->get_property ("left-position");
   SCM rp = me->get_property ("right-position");  
   
-  if (ly_number_p (lp) && !ly_number_p (rp))
+  if (is_number (lp) && !is_number (rp))
     {
       rp = scm_make_real (ly_scm2double (lp) + dy);
     }
-  else if (ly_number_p (rp) && !ly_number_p (lp))
+  else if (is_number (rp) && !is_number (lp))
     {
       lp = scm_make_real (ly_scm2double (rp) - dy);
     }
-  else if (!ly_number_p (rp) && !ly_number_p (lp))
+  else if (!is_number (rp) && !is_number (lp))
     {
       lp = scm_make_real (offset);
       rp = scm_make_real (offset +dy);
@@ -515,7 +515,7 @@ Direction
 Tuplet_bracket::get_default_dir (Grob*me)
 {
   Drul_array<int> dirs (0,0);  
-  for (SCM s = me->get_property ("note-columns"); ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("note-columns"); is_pair (s); s = ly_cdr (s))
     {
       Grob * nc = unsmob_grob (ly_car (s));
       Direction d = Note_column::dir (nc);
index d837691b1f81e78df020d1955b59baf9a0aa6cbf..42a518511806eb6083cdc9e912afc3e4178705a5 100644 (file)
@@ -79,7 +79,7 @@ Tuplet_engraver::process_acknowledged_grobs ()
       
 
       SCM proc = get_property ("tupletNumberFormatFunction");
-      if (ly_procedure_p (proc))
+      if (is_procedure (proc))
        {
          SCM t = scm_apply_0 (proc, scm_list_n (time_scaled_musics_[i]->self_scm (), SCM_UNDEFINED));
          glep->set_property ("text", t);
index 0f2c980c5096440c42c8bea6ad317e43c975ba7c..d4636778c9cc457f44405dd848d22eb1a0a5d071 100644 (file)
@@ -109,7 +109,7 @@ Volta_repeat_iterator::add_repeat_command (SCM what)
 
   Context * where = get_outlet ()->where_defined (reps);
   if (where
-      && current_reps == SCM_EOL || ly_pair_p (current_reps))
+      && current_reps == SCM_EOL || is_pair (current_reps))
     {
       current_reps = scm_cons (what, current_reps);
       where->internal_set_property (reps, current_reps);
index 7296c856ed2683de0ca0ba57e797245bf537d8a9..f4305a1cb9ac5de35521b2d440ccb552e58e634c 100644 (file)
@@ -26,14 +26,14 @@ Virtual_font_metric::Virtual_font_metric (SCM font_list)
   SCM name_list = SCM_EOL;
   SCM *name_tail = &name_list;
   
-  for (SCM s = font_list; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list; is_pair (s); s = ly_cdr (s))
     {
       if (Font_metric *fm = unsmob_metrics (ly_car (s)))
        {
          *tail =  scm_cons (ly_car (s),SCM_EOL);
          tail = SCM_CDRLOC (*tail);
 
-         if (!ly_number_p (mag))
+         if (!is_number (mag))
            /* Ugh.  */
            mag = ly_cdr (fm->description_);
 
@@ -61,7 +61,7 @@ int
 Virtual_font_metric::count () const
 {
   int k = 0;
-  for (SCM s = font_list_; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list_; is_pair (s); s = ly_cdr (s))
       k += unsmob_metrics (ly_car (s))->count ();
   return k;
 }
@@ -70,7 +70,7 @@ Stencil
 Virtual_font_metric::find_by_name (String glyph) const
 {
   Stencil m;  
-  for (SCM s = font_list_; m.is_empty () && ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list_; m.is_empty () && is_pair (s); s = ly_cdr (s))
     {
       m = unsmob_metrics (ly_car (s))->find_by_name (glyph);
     }
@@ -96,7 +96,7 @@ Offset
 Virtual_font_metric::get_indexed_wxwy (int code)  const
 {
   int total = 0;
-  for (SCM s = font_list_; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list_; is_pair (s); s = ly_cdr (s))
     {
       Font_metric *fm = unsmob_metrics (ly_car (s));
       if (code < total + fm->count ())
@@ -110,7 +110,7 @@ Box
 Virtual_font_metric::get_indexed_char (int code)  const
 {
   int total = 0;
-  for (SCM s = font_list_; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list_; is_pair (s); s = ly_cdr (s))
     {
       Font_metric *fm = unsmob_metrics (ly_car (s));
       if (code < total + fm->count ())
@@ -125,7 +125,7 @@ Virtual_font_metric::name_to_index (String glyph) const
 {
   Stencil m;
   int total = 0; 
-  for (SCM s = font_list_; m.is_empty () && ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list_; m.is_empty () && is_pair (s); s = ly_cdr (s))
     {
       Font_metric *m =unsmob_metrics (ly_car (s));
       int k = m->name_to_index (glyph);
@@ -143,7 +143,7 @@ Virtual_font_metric::get_indexed_char_stencil (int code)  const
   Stencil  m ;  
   int total = 0;
   
-  for (SCM s = font_list_; ly_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list_; is_pair (s); s = ly_cdr (s))
     {
       Font_metric *fm = unsmob_metrics (ly_car (s));
       if (code < total + fm->count ())
index 95be78a51e2760d854e0d15f97382ef7d8ec4e74..359cf5b6ebb0362f67743ec505fd98ce7674d866 100644 (file)
@@ -56,7 +56,7 @@ Volta_bracket_interface::print (SCM smob)
   SCM glyph = endbar->get_property ("glyph");
   
   String str;
-  if (ly_string_p (glyph))
+  if (is_string (glyph))
     str = ly_scm2string (glyph);
   else
     return SCM_EOL;
index 1dca3edef95cd832e333c9335d7937a720b0c22a..7a9cbe25f4cad7c3ceb2711b18092e0c007be2ba 100644 (file)
@@ -82,7 +82,7 @@ Volta_engraver::staff_eligible ()
        volta engraver in score context or somesuch.
        
       */
-      if (!ly_pair_p (staffs))
+      if (!is_pair (staffs))
        {
          programming_error ("Huh? Volta engraver can't find staffs?");
          return false;
@@ -106,13 +106,13 @@ Volta_engraver::process_music ()
     
   bool  end = false;
   start_string_ = SCM_EOL;
-  while (ly_pair_p (cs))
+  while (is_pair (cs))
     {
       SCM c = ly_car (cs);
 
-      if (ly_pair_p (c)
+      if (is_pair (c)
          && ly_car (c) == ly_symbol2scm ("volta")
-         && ly_pair_p (ly_cdr (c)))
+         && is_pair (ly_cdr (c)))
        {
          if (ly_cadr (c) ==  SCM_BOOL_F)
            end = true;
@@ -146,7 +146,7 @@ Volta_engraver::process_music ()
     }
 
   if (volta_span_ && 
-      (ly_string_p (start_string_) || ly_pair_p (start_string_)))
+      (is_string (start_string_) || is_pair (start_string_)))
     {
       warning (_ ("Already have a volta spanner.  Stopping that one prematurely."));
       
@@ -161,7 +161,7 @@ Volta_engraver::process_music ()
     }
 
   if (!volta_span_ && 
-      (ly_string_p (start_string_) || ly_pair_p (start_string_)))
+      (is_string (start_string_) || is_pair (start_string_)))
     {
       started_mom_ = now_mom () ;
 
index ea281bb7700cc85324b4fe34ada7a562357a8e45..0e049f7ce8905e7a1153f48ad66896b7f77d2771 100644 (file)
 ;;     syntax, description and example. 
 
 
-(def-markup-command (word paper props str) (string?)
-  "A single word."
-  (interpret-markup paper props str))
   
 (def-markup-command (simple paper props str) (string?)
-  "A simple text-string; @code{\\markup @{ foo @}} is equivalent with
+  "A simple text string; @code{\\markup @{ foo @}} is equivalent with
 @code{\\markup @{ \\simple #\"foo\" @}}."
-    (interpret-markup paper props
-                     (make-word-markup str)))
+    (interpret-markup paper props str))
+
+(def-markup-command (encoded-simple paper props sym str) (symbol? string?)
+  "A text string, encoded with encoding @var{sym}."
+  (Text_item::interpret_string paper props sym str))
 
 ;; TODO: use font recoding.
 ;;                   (make-line-markup