]> git.donarmstrong.com Git - lilypond.git/commitdiff
''
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 18 May 2002 23:45:18 +0000 (23:45 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 18 May 2002 23:45:18 +0000 (23:45 +0000)
34 files changed:
ChangeLog
Documentation/user/internals.itely
Documentation/user/refman.itely
lily/chord.cc
lily/cxx-function-smob.cc
lily/duration.cc
lily/font-interface.cc
lily/font-metric.cc
lily/grob-interface.cc
lily/grob.cc
lily/include/lily-guile.hh
lily/include/lookup.hh
lily/include/ly-smobs.icc
lily/include/molecule.hh
lily/include/music-iterator.hh
lily/include/pitch.hh
lily/include/translator.hh
lily/input-smob.cc
lily/lily-guile.cc
lily/lookup.cc
lily/molecule.cc
lily/moment.cc
lily/music.cc
lily/pitch.cc
lily/scm-option.cc
lily/system.cc
lily/translator-ctors.cc
lily/translator-group.cc
lily/translator.cc
scm/backend-documentation-lib.scm
scm/engraver-documentation-lib.scm
scm/generate-documentation.scm
scm/molecule.scm
scripts/convert-ly.py

index 2c935ac275591d240b04f9287ba17697d0a1e4ed..34f3a76a4af716f53621b3c11d9898d9c7dd5897 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-05-19  Han-Wen  <hanwen@cs.uu.nl>
+
+       * lily/*.cc: use LY_DEFINE everywhere. Move doc strings from
+       Documentation/user/internals.itely.
+
+       * lily/function-documentation.cc: new file. Infrastructure for
+       self documenting Scheme functions.
+
 2002-05-18  Han-Wen  <hanwen@cs.uu.nl>
 
        * lily/stem.cc (calc_stem_info): bugfix for less ugly knees.
index a22b7acf3b1e733a0df936c298d821c12ff81223..9ecae65478ce5597b791675305f8a76c5f63de25 100644 (file)
@@ -76,176 +76,10 @@ The data types that are mentioned here are all discussed in this
 section.
 
 @menu
-* Input location::              
-* Moment::                      
-* Duration::                    
-* Pitch data type::             
-* Music::                       
-* Music_iterator::              
-* Translator::                  
 * Grobs::                       Graphical object  
 * Molecules::                   Molecules are stand-alone descriptions of output
-* Font metrics::                Font metrics
-* Miscellaneous Scheme functions::  
 @end menu
 
-@ignore
-  Why not use Scheme syntax for the functions below, such as
-  (ly-input-location? obj) and (ly-get-mus-property m sym) ?
-
-  /MB
-@end ignore
-
-@node Input location
-@section Input location
-
-@c The parser generates
-
-Input location objects point to a location in the input file. This
-location is used to generate error messages and to enable the point and
-click output.
-
-@defun ly-input-location? obj
-Type predicate, return true if @var{obj} is an input location.
-@end defun
-
-
-
-
-@node Moment
-@section Moment
-
-Moment is a point in musical time. It is consists of a pair of
-rationals (@var{m},@var{g}), where @var{m} is the timing for the  main
-notes, and @var{g} the timing for  grace notes. In absence of grace
-notes, @var{g} is zero.
-
-@defun moment? obj
-Type predicate, return true if @var{obj} is a moment.
-@end defun
-
-@defun make-moment num den
-create the rational number with main timing @var{num}/@var{den}. 
-@end defun
-
-@node Duration
-@section Duration
-
-A duration is a musical duration, i.e. a length of time described by a
-power of two (whole, half, quarter, etc.) and a number of augmentation
-dots. 
-
-@defun make-duration length dotcount
-
-@var{length} is the negative logarithm (base 2) of the duration:
-1 is a half note, 2 is a quarter note, 3 is an eighth
-note, etc.  The number of dots after the note is given by
-@var{dotcount}.
-@end defun
-
-
-@defun duration? obj
-Type predicate, return true if @var{obj} is a duration.
-@end defun
-
-@node Pitch data type
-@section Pitch data type
-
-
-
-@defun make-pitch octave note shift
-
-@var{octave} is specified by an integer, zero for the octave containing
-middle C.  @var{note} is a number from 0 to 6, with 0 corresponding to C
-and 6 corresponding to B.  The shift is zero for a natural, negative for
-flats, or positive for sharps.
-@end defun
-
-@defun pitch-octave p 
-extract the octave from pitch @var{p}.
-@end defun
-
-@defun pitch-notename p
-extract the note name from pitch  @var{p}.
-@end defun
-
-@defun pitch-alteration p
-extract the alteration from pitch  @var{p}.
-@end defun
-
-@defun pitch-semitones p
-calculate the number of semitones of @var{p} from central C.
-@end defun
-
-@defun Pitch@code{:}@code{:}transpose t p
-Transpose @var{p} by the amount @var{t}, where @var{t} is the pitch that
-central C is transposed to. 
-@end defun
-
-
-@node Music
-@section Music
-
-Music is the data type that music expressions are stored in. The data
-type does not yet offer many manipulations.
-
-@defun ly-get-mus-property m sym
-Get the property @var{sym} of music expression @var{m}.
-@end defun
-
-@defun ly-set-mus-property m sym val
-Set property @var{sym} in music expression @var{m} to @var{val}.
-@end defun
-
-@defun ly-make-music name
-Make a music object/expression of type @var{name}. Warning: this
-interface will likely change in the near future.
-@end defun
-
-@defun music? obj
-Type predicate,  return true if @var{obj} is a music object.
-@end defun
-
-@defun ly-music-name music
-Print the name of @var{music}.
-@end defun
-
-
-@node Music_iterator
-@section Music_iterator
-
-Music_iterator is an object type that traverses the Music structure and
-reports the events it finds to interpretation contexts. It is not yet
-user-serviceable.
-
-@defun c++-function? obj
-Type predicate, return true if @var{obj} is a  c++-function.
-Music_iterator are created from schemified C++ constructors. Such a
-constructor is a @code{c++-function}.
-@end defun
-
-@node Translator
-@section Translator
-
-Translators are the building blocks of contexts. They are not yet user
-accessible.
-
-@defun ly-get-trans-property tr sym
-retrieve the value of @var{sym} from context @var{tr}
-@end defun
-
-@defun ly-set-trans-property tr sym val
-set value of property @var{sym} in context @var{tr} to @var{val}.
-@end defun
-
-@defun Translator@code{:}@code{:}name tr
-Return the type name of the translator @var{tr}.
-@end defun 
-
-@defun Translator@code{:}@code{:}description tr
-Return an alist of properties of  translator @var{tr}.
-@end defun
-
 @node Grobs
 @section Grobs
 
@@ -519,25 +353,6 @@ no extent.
 Grob properties can be manipulated from Scheme. In practice, most
 manipulations are coded in C++ because of tradition.
 
-@defun ly-get-grob-property g sym
-  Get the value of a value in grob @var{g} of property @var{sym}. It
-will return @code{'()} (end-of-list) if @var{g} doesn't have @var{sym} set.
-@end  defun
-
-@defun ly-set-grob-property g sym val
-Set @var{sym} in grob @var{g} to value @var{val}
-@end defun
-
-@defun ly-get-spanner-bound spanner dir
-Get one of the bounds of @var{spanner}. @var{dir} may be @code{-1} for
-left, and @code{1} for right.
-@end defun
-
-@defun ly-grob? g
-Typecheck: is @var{g} a grob?
-@end defun
-
-
 
 
 @node Molecules
@@ -588,92 +403,5 @@ returning a Molecule.  Most molecule callbacks are written in C++, but
 you can also write them in Scheme. An example is provided in
 @code{input/regression/molecule-hacking.ly}.
 
-
-@defun molecule? m
-type predicate.
-@end defun
-
-@defun ly-combine-molecule-at-edge  mol1 axis dir mol2 padding
-Construct a molecule by putting @var{mol2} next to
-@var{mol1}. @var{axis} can be 0 (x-axis) or 1 (y-axis), @var{dir} can be
--1 (left or down) or 1 (right or up).  @var{padding} specifies extra
-space to add in between measured in global staff space.
-@end defun
-
-@defun ly-get-molecule-extent! mol axis
-Return a pair of numbers signifying the extent of @var{mol} in
-@var{axis} direction (0 or 1 for x and y axis respectively).
-@end defun
-
-@defun ly-set-molecule-extent! mol axis extent
-Set the extent (@var{extent} must be a pair of numbers) of @var{mol} in 
-@var{axis} direction (0 or 1 for x- and y-axis respectively).
-
-Note that an extent @code{(A . B)} is an interval and hence @code{A} is
-smaller than @code{B}, and is often negative.
-
-@end defun
-
-@node Font metrics
-@section Font metrics
-
-The font object represents the metric information of a font. Every font
-that is loaded into LilyPond can be accessed via Scheme. 
-
-LilyPond only needs to know the dimension of glyph to be able to process
-them. This information is stored in font metric files. LilyPond can read
-two types of font-metrics: @TeX{} Font Metric files (TFM files) and
-Adobe Font Metric files (AFM files).  LilyPond will always try to load
-AFM files first since they are more versatile.
-
-@defun ly-get-default-font gr
-This returns the default font for grob @var{gr}.
-@end defun
-
-@defun ly-find-glyph-by-name font name
-This function retrieves a Molecule for the glyph named @var{name} in
-@var{font}.  The font must be available as an AFM file.
-@cindex afm file
-
-@end defun
-
-@node Miscellaneous Scheme functions
-@section Miscellaneous Scheme functions
-
  
-@defun ly-warn msg
-Scheme callable function to issue the warning @code{msg}.
-@end defun
-
-@defun ly-version
-Return the current lilypond version as a list, e.g.
-@code{(1 3 127 uu1)}. 
-@end defun
-
-@defun ly-gulp-file name
-Read the file named @var{name}, and return its contents in a string. The
-file is looked up using the lilypond search path.
-
-@end defun
-
-@defun dir?
-type predicate. A direction is a -1, 0 or 1, where -1 represents left or
-down and 1 represents right or up.
-@end defun
-
-@defun ly-number->string num
- converts @var{num} to a string without generating many decimals. It
-leaves a space at the end.
-@end defun
-
-@defun set-lily-option sym val
- Set a global option for the program. Supported options  include
-@table @code
-@item midi-debug
-If set to true, generate human  readable MIDI
-@end table
-
-This function is useful to call from the command line: @code{lilypond -e
-"(set-lily-option 'midi-debug #t)"}
 
-@end defun 
index 139209c90dbe0a7ac514efc3f748eb1e467eb62f..ea6a73ff374a189b946192e262c34335ec2cfdf2 100644 (file)
@@ -196,7 +196,7 @@ The verbose syntax for pitch specification is
   \pitch @var{scmpitch}
 @end example
 
-@var{scmpitch} is a pitch scheme object, see @ref{Pitch data type}.
+@var{scmpitch} is a pitch scheme object.
 
 In Note and Chord mode, pitches may be designated by names.  The default
 names are the Dutch note names.  The notes are specified by the letters
@@ -320,8 +320,7 @@ The syntax for a verbose duration specification is
 @example
  \duration @var{scmduration}
 @end example
-Here, @var{scmduration} is a Scheme object of type @code{Duration}. See
-@ref{Duration} for more information.
+Here, @var{scmduration} is a Scheme object of type @code{Duration}.
 
 
 In Note, Chord, and Lyrics mode, durations may be designated by numbers
@@ -4676,8 +4675,7 @@ including dimensions.  Produced by some Grob functions
 See @ref{Molecules}
 @item Translator: object that produces audio objects or Grobs. This is
 not yet user accessible.
-@item Font_metric: object representing a font. (See @ref{Font metrics})
-
+@item Font_metric: object representing a font.
 @end itemize
 
 
index e76549a49ef43dd7d4a6e5025997710bc8a4b917..bb41246ffac176ea9a1491429c560dab4d2d21cc 100644 (file)
@@ -23,8 +23,8 @@ Chord::base_pitches (SCM tonic)
   SCM minor = Pitch (0, 2, -1).smobbed_copy ();
 
   base = gh_cons (tonic, base);
-  base = gh_cons (pitch_transpose (ly_car (base), major), base);
-  base = gh_cons (pitch_transpose (ly_car (base), minor), base);
+  base = gh_cons (ly_pitch_transpose (ly_car (base), major), base);
+  base = gh_cons (ly_pitch_transpose (ly_car (base), minor), base);
 
   return scm_reverse_x (base, SCM_EOL);
 }
@@ -38,7 +38,7 @@ Chord::transpose_pitches (SCM tonic, SCM pitches)
   SCM transposed = SCM_EOL;
   for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
     {
-      transposed = gh_cons (pitch_transpose (tonic, ly_car (i)),
+      transposed = gh_cons (ly_pitch_transpose (tonic, ly_car (i)),
                            transposed);
     }
   return scm_reverse_x (transposed, SCM_EOL);
@@ -60,7 +60,7 @@ Chord::lower_step (SCM tonic, SCM pitches, SCM step)
       if (gh_equal_p (step_scm (tonic, ly_car (i)), step)
          || gh_scm2int (step) == 0)
        {
-         p = pitch_transpose (p, Pitch (0, 0, -1).smobbed_copy ());
+         p = ly_pitch_transpose (p, Pitch (0, 0, -1).smobbed_copy ());
        }
       lowered = gh_cons (p, lowered);
     }
@@ -169,7 +169,7 @@ Chord::missing_thirds (SCM pitches)
        {
          int third = (unsmob_pitch (last)->notename_i_
                       - unsmob_pitch (tonic)-> notename_i_ + 7) % 7;
-         last = pitch_transpose (last, scm_vector_ref (thirds, gh_int2scm (third)));
+         last = ly_pitch_transpose (last, scm_vector_ref (thirds, gh_int2scm (third)));
        }
       
       if (step > gh_scm2int (step_scm (tonic, last)))
@@ -179,7 +179,7 @@ Chord::missing_thirds (SCM pitches)
              missing = gh_cons (last, missing);
              int third = (unsmob_pitch (last)->notename_i_
                           - unsmob_pitch (tonic)->notename_i_ + 7) % 7;
-             last = pitch_transpose (last, scm_vector_ref (thirds,
+             last = ly_pitch_transpose (last, scm_vector_ref (thirds,
                                                      gh_int2scm (third)));
            }
        }
@@ -199,7 +199,7 @@ Chord::add_above_tonic (SCM pitch, SCM pitches)
   /* Should we maybe first make sure that PITCH is below tonic? */
   if (pitches != SCM_EOL)
     while (Pitch::less_p (pitch, ly_car (pitches)) == SCM_BOOL_T)
-      pitch = pitch_transpose (pitch, Pitch (1, 0, 0).smobbed_copy ());
+      pitch = ly_pitch_transpose (pitch, Pitch (1, 0, 0).smobbed_copy ());
    
   pitches = gh_cons (pitch, pitches);
   return scm_sort_list (pitches, Pitch::less_p_proc);
@@ -211,7 +211,7 @@ Chord::add_below_tonic (SCM pitch, SCM pitches)
 {
   if (pitches != SCM_EOL)
     while (Pitch::less_p (ly_car (pitches), pitch) == SCM_BOOL_T)
-      pitch = Pitch::transpose (pitch, Pitch (-1, 0, 0).smobbed_copy ());
+      pitch = ly_pitch_transpose (pitch, Pitch (-1, 0, 0).smobbed_copy ());
   return gh_cons (pitch, pitches);
 }
 
@@ -284,7 +284,7 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub)
 
   /* if additions include any 4, assume sus4 and don't add third implicitely
      C-sus (4) = c f g (1 4 5) */
-  SCM sus = Pitch::transpose (tonic, Pitch (0, 3, 0).smobbed_copy ());
+  SCM sus = ly_pitch_transpose (tonic, Pitch (0, 3, 0).smobbed_copy ());
   if (member_notename (sus, add) != SCM_BOOL_F)
     missing = scm_delete (third, missing);
   
index 0c4f04aeef227ca650d9eb4bcc371902044f3e34..603a16203ed6892555da7fb9892d2b8218dc776c 100644 (file)
@@ -31,9 +31,8 @@ free_smob (SCM)
   return 0;
 }
 
-
-SCM
-cxx_function_type_p (SCM x)
+LY_DEFINE(cxx_function_type_p, "c++-function?", 1, 0, 0, (SCM x),
+         "Is this an encapsulated C++ function ?")
 {
   return (SCM_CELL_TYPE (x)) == callback_tag ? SCM_BOOL_T : SCM_BOOL_F; 
 }
@@ -45,9 +44,6 @@ void init_cxx_function_smobs ()
   scm_set_smob_free (callback_tag, free_smob);
   scm_set_smob_print (callback_tag, print_smob);
   scm_set_smob_equalp (callback_tag, 0);
-
-  scm_c_define_gsubr ("c++-function?", 1, 0, 0,
-                     (Scheme_function_unknown) cxx_function_type_p);
 }
 
 SCM
index c46afab1080e9078d1661f080dd9e30c30d56224..2ba674802e5f1f8d7bb389450fbaafd9b2f130fc 100644 (file)
@@ -128,25 +128,29 @@ Duration::less_p (SCM p1, SCM p2)
     return SCM_BOOL_F;
 }
 
-static SCM
-make_duration (SCM l, SCM d)
+
+LY_DEFINE(make_duration,
+         "make-duration", 2, 0, 0, (SCM length, SCM dotcount),
+         "
+@var{length} is the negative logarithm (base 2) of the duration:
+1 is a half note, 2 is a quarter note, 3 is an eighth
+note, etc.  The number of dots after the note is given by
+@var{dotcount}.
+
+
+A duration is a musical duration, i.e. a length of time described by a
+power of two (whole, half, quarter, etc.) and a number of augmentation
+dots. 
+
+")
 {
-  SCM_ASSERT_TYPE(gh_number_p(l), l, SCM_ARG1, __FUNCTION__, "integer");
-  SCM_ASSERT_TYPE(gh_number_p(d), d, SCM_ARG2, __FUNCTION__, "integer");
+  SCM_ASSERT_TYPE(gh_number_p(length), length, SCM_ARG1, __FUNCTION__, "integer");
+  SCM_ASSERT_TYPE(gh_number_p(dotcount), dotcount, SCM_ARG2, __FUNCTION__, "integer");
   
-  Duration p (gh_scm2int (l), gh_scm2int (d));
+  Duration p (gh_scm2int (length), gh_scm2int (dotcount));
   return p.smobbed_copy ();
 }
 
-static void
-add_funcs ()
-{
-  scm_c_define_gsubr ("make-duration", 2, 0, 0,
-                     (Scheme_function_unknown)make_duration);
-}
-
-ADD_SCM_INIT_FUNC (duration, add_funcs);
-
 SCM
 Duration::smobbed_copy ()const
 {
index 09275dc19d3d4d94bacade9762eefb0e6b7ef420..57cf99679e72d511c813879f4e68c18dc2a31917 100644 (file)
@@ -65,8 +65,9 @@ Font_interface::get_default_font (Grob*me)
 }
 
 
-SCM
-ly_font_interface_get_default_font (SCM grob)
+LY_DEFINE(ly_font_interface_get_default_font,
+         "ly-get-default-font", 1 , 0, 0,
+         (SCM grob), "Return the default font for grob @var{gr}.")
 {
   Grob * gr  = unsmob_grob (grob);
   SCM_ASSERT_TYPE(gr, grob, SCM_ARG1, __FUNCTION__, "grob");
@@ -74,8 +75,21 @@ ly_font_interface_get_default_font (SCM grob)
   return Font_interface::get_default_font (gr)->self_scm ();
 }
 
-SCM
-ly_font_interface_get_font (SCM grob, SCM alist)
+LY_DEFINE(ly_font_interface_get_font,"ly-get-font", 2, 0, 0,
+         (SCM grob, SCM alist),
+         "Return a font metric satisfying the font-qualifiers in @var{alist}.
+
+
+The font object represents the metric information of a font. Every font
+that is loaded into LilyPond can be accessed via Scheme. 
+
+LilyPond only needs to know the dimension of glyph to be able to process
+them. This information is stored in font metric files. LilyPond can read
+two types of font-metrics: @TeX{} Font Metric files (TFM files) and
+Adobe Font Metric files (AFM files).  LilyPond will always try to load
+AFM files first since they are more versatile.
+
+")
 {
   Grob * gr  = unsmob_grob (grob);
   SCM_ASSERT_TYPE(gr, grob, SCM_ARG1, __FUNCTION__, "grob");
@@ -162,13 +176,9 @@ init_syms ()
   rel_sz_sym = scm_permanent_object (ly_symbol2scm ("font-relative-size"));
   design_sz_sym = scm_permanent_object (ly_symbol2scm ("font-design-size"));
   wild_sym = scm_permanent_object (ly_symbol2scm ("*"));
-
-  scm_c_define_gsubr ("ly-get-default-font", 1 , 0, 0,
-                     (Scheme_function_unknown) ly_font_interface_get_default_font);
-  scm_c_define_gsubr ("ly-get-font", 2, 0, 0,
-                     (Scheme_function_unknown) ly_font_interface_get_font);
 }
 
+ADD_SCM_INIT_FUNC(fi_init_syms, init_syms);
 
 bool
 Font_interface::wild_compare (SCM field_val, SCM val)
@@ -176,8 +186,6 @@ Font_interface::wild_compare (SCM field_val, SCM val)
   return (val == SCM_BOOL_F || field_val == wild_sym || field_val == val);
 }
 
-ADD_SCM_INIT_FUNC (Font_interface_syms,init_syms);
-
 
 MAKE_SCHEME_CALLBACK (Font_interface,properties_to_font_name,2);
 SCM
index 84c1cd10456a77b2f3e6b0c66882f034e16ca681..c2c9999d8fe77206f95708fe63ece39b4f0f6f07 100644 (file)
@@ -134,8 +134,10 @@ Font_metric::find_by_name (String) const
 }
 
 
-SCM
-ly_find_glyph_by_name (SCM font, SCM name)
+LY_DEFINE(ly_find_glyph_by_name, "ly-find-glyph-by-name", 2 , 0, 0,
+         (SCM font, SCM name),
+         "This function retrieves a Molecule for the glyph named @var{name} in
+@var{font}.  The font must be available as an AFM file.")
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE(fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
@@ -145,8 +147,11 @@ ly_find_glyph_by_name (SCM font, SCM name)
 }
 
 
-SCM
-ly_text_dimension (SCM font, SCM text)
+LY_DEFINE(ly_text_dimension,"ly-text-dimension", 2 , 0, 0,
+         (SCM font, SCM text),
+         "Given the font metric in @var{font} and the string @var{text}, compute
+the extents of that text in that font. The return value is a pair of
+number-pairs.")
 {
   Box b;
   Font_metric *fm = unsmob_metrics (font);
@@ -159,13 +164,3 @@ ly_text_dimension (SCM font, SCM text)
 }
 
 
-static void
-font_metric_init ()
-{
-   scm_c_define_gsubr ("ly-find-glyph-by-name", 2 , 0, 0,
-                      (Scheme_function_unknown) ly_find_glyph_by_name);
-   scm_c_define_gsubr ("ly-text-dimension", 2 , 0, 0,
-                      (Scheme_function_unknown) ly_text_dimension);
-}
-
-ADD_SCM_INIT_FUNC (font_metric_init, font_metric_init);
index b6fd450b3f061c5de18df286d6406e05161fb52b..572e858c313d12677b35febac41539e39b9581b4 100644 (file)
@@ -18,8 +18,9 @@ void add_interface (const char * symbol,
   ly_add_interface(s,d,l);
 }
 
-SCM
-ly_add_interface (SCM a, SCM b, SCM c)
+
+LY_DEFINE(ly_add_interface, "ly-add-interface", 3,0,0, (SCM a, SCM b, SCM c),
+         "Add an interface description.")
 {
   SCM_ASSERT_TYPE (gh_symbol_p(a), a, SCM_ARG1, __FUNCTION__, "symbol");
   SCM_ASSERT_TYPE (gh_string_p(b), b, SCM_ARG2, __FUNCTION__, "string");  
@@ -38,23 +39,13 @@ ly_add_interface (SCM a, SCM b, SCM c)
 }
 
 
-SCM
-ly_all_grob_interfaces ()
+LY_DEFINE(ly_all_grob_interfaces, "ly-all-grob-interfaces",
+         0,0,0, (),
+         "Get a hash table with all interface descriptions.")
 {
   return all_ifaces;
 }
 
-void
-init_iface_funcs ()
-{
-  scm_c_define_gsubr ("ly-add-interface", 3, 0, 0,
-                     (Scheme_function_unknown)ly_add_interface);
-  scm_c_define_gsubr ("ly-all-grob-interfaces", 0, 0, 0,
-                     (Scheme_function_unknown)ly_all_grob_interfaces);
-}
-
-ADD_SCM_INIT_FUNC(giface, init_iface_funcs);
-
 void
 check_interfaces_for_property (Grob const *me, SCM sym)
 {
index 814aeee6381a5567d3b5a821a950b869369b864c..8e64b58098e3a353a6be9d88cce91c47f1360647 100644 (file)
@@ -490,7 +490,7 @@ Grob::handle_broken_dependencies ()
        dependencies, so let's junk the element itself.
 
        do not do this for System, since that would remove
-       references to the originals of score-elts, which get then GC'd
+       references to the originals of score-grobs, which get then GC'd
  (a bad thing.)
       */
       suicide ();
@@ -851,12 +851,13 @@ Grob::do_derived_mark ()
   return SCM_EOL;
 }
 
-
-SCM
-ly_set_grob_property (SCM elt, SCM sym, SCM val)
+LY_DEFINE(ly_set_grob_property,"ly-set-grob-property", 3, 0, 0,
+(SCM grob, SCM sym, SCM val),
+"
+Set @var{sym} in grob @var{grob} to value @var{val}")
 {
-  Grob * sc = unsmob_grob (elt);
-  SCM_ASSERT_TYPE(sc, elt, SCM_ARG1, __FUNCTION__, "grob");
+  Grob * sc = unsmob_grob (grob);
+  SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob");
   SCM_ASSERT_TYPE(gh_symbol_p(sym), sym, SCM_ARG2, __FUNCTION__, "symbol");  
 
   if (!type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
@@ -866,12 +867,14 @@ ly_set_grob_property (SCM elt, SCM sym, SCM val)
   return SCM_UNSPECIFIED;
 }
 
-
-SCM
-ly_get_grob_property (SCM elt, SCM sym)
+LY_DEFINE(ly_get_grob_property,
+         "ly-get-grob-property", 2, 0, 0, (SCM grob, SCM sym),
+         "  Get the value of a value in grob @var{g} of property @var{sym}. It
+will return @code{'()} (end-of-list) if @var{g} doesn't have @var{sym} set.
+")
 {
-  Grob * sc = unsmob_grob (elt);
-  SCM_ASSERT_TYPE(sc, elt, SCM_ARG1, __FUNCTION__, "grob");
+  Grob * sc = unsmob_grob (grob);
+  SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob");
   SCM_ASSERT_TYPE(gh_symbol_p(sym), sym, SCM_ARG2, __FUNCTION__, "symbol");  
 
   return sc->internal_get_grob_property (sym);
@@ -884,9 +887,11 @@ Grob::discretionary_processing ()
 }
 
 
-
-SCM
-spanner_get_bound (SCM slur, SCM dir)
+LY_DEFINE(spanner_get_bound, "ly-get-spanner-bound", 2 , 0, 0,
+         (SCM slur, SCM dir),
+         "Get one of the bounds of @var{spanner}. @var{dir} may be @code{-1} for
+left, and @code{1} for right.
+")
 {
   Spanner * sl = dynamic_cast<Spanner*> (unsmob_grob (slur));
   SCM_ASSERT_TYPE(sl, slur, SCM_ARG1, __FUNCTION__, "spanner grob");
@@ -894,8 +899,9 @@ spanner_get_bound (SCM slur, SCM dir)
   return sl->get_bound (to_dir (dir))->self_scm ();
 }
 
-SCM
-ly_get_paper_var (SCM grob, SCM sym)
+LY_DEFINE(ly_get_paper_var,"ly-get-paper-variable", 2, 0, 0,
+  (SCM grob, SCM sym),
+  "Get a variable from the \\paper block.")
 {
   Grob * sc = unsmob_grob (grob);
   SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob");
@@ -906,8 +912,10 @@ ly_get_paper_var (SCM grob, SCM sym)
 
 
 
-SCM
-ly_get_extent (SCM grob, SCM refp, SCM axis)
+LY_DEFINE(ly_get_extent, "ly-get-extent", 3, 0, 0,
+         (SCM grob, SCM refp, SCM axis),
+         "Get the extent in @var{axis} direction of @var{grob} relative to the
+grob @var{refp}")
 {
   Grob * sc = unsmob_grob (grob);
   Grob * ref = unsmob_grob (refp);
@@ -919,8 +927,9 @@ ly_get_extent (SCM grob, SCM refp, SCM axis)
   return ly_interval2scm ( sc->extent (ref, Axis (gh_scm2int (axis))));
 }
 
-SCM
-ly_get_parent (SCM grob, SCM axis)
+LY_DEFINE (ly_get_parent,   "ly-get-parent", 2, 0, 0, (SCM grob, SCM axis),
+          "Get the parent of @var{grob}.  @var{axis} can be 0 for the X-axis, 1
+for the Y-axis.")
 {
   Grob * sc = unsmob_grob (grob);
   SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob");
@@ -930,23 +939,6 @@ ly_get_parent (SCM grob, SCM axis)
 }
 
 
-static void
-init_functions ()
-{
-  scm_c_define_gsubr ("ly-get-grob-property", 2, 0, 0,
-                     (Scheme_function_unknown)ly_get_grob_property);
-  scm_c_define_gsubr ("ly-set-grob-property", 3, 0, 0,
-                     (Scheme_function_unknown)ly_set_grob_property);
-  scm_c_define_gsubr ("ly-get-spanner-bound", 2 , 0, 0,
-                     (Scheme_function_unknown) spanner_get_bound);
-  scm_c_define_gsubr ("ly-get-paper-variable", 2, 0, 0,
-                     (Scheme_function_unknown) ly_get_paper_var);
-  scm_c_define_gsubr ("ly-get-extent", 3, 0, 0,
-                     (Scheme_function_unknown) ly_get_extent);
-  scm_c_define_gsubr ("ly-get-parent", 2, 0, 0,
-                     (Scheme_function_unknown) ly_get_parent);
-}
-
 bool
 Grob::internal_has_interface (SCM k)
 {
@@ -955,8 +947,6 @@ Grob::internal_has_interface (SCM k)
   return scm_memq (k, ifs) != SCM_BOOL_F;
 }
 
-
-ADD_SCM_INIT_FUNC (scoreelt, init_functions);
 IMPLEMENT_TYPE_P (Grob, "ly-grob?");
 
 ADD_INTERFACE (Grob, "grob-interface",
index 62a00dec4ce1b6a4406102bd6d2cfa212077557b..7fb9c8025ba51f469f6c2a140e7a2e1ec50c0984 100644 (file)
@@ -244,6 +244,10 @@ TYPE ## _ ## FUNC ## _init_functions ()                                    \
 ADD_SCM_INIT_FUNC (TYPE ## _ ## FUNC ## _callback, TYPE ## _ ## FUNC ## _init_functions);      \
 
 
+void ly_add_function_documentation (char const * fname,
+                                   char const * varlist,
+                                   char const * doc);
+
 #define ADD_SCM_INIT_FUNC(name, func)\
 class name ## _scm_initter {                   \
 public:\
@@ -254,4 +258,20 @@ public:\
 } _ ## name ## _scm_initter;                   \
 /* end define */
 
+#define LY_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \
+SCM FNAME ARGLIST ; \
+SCM FNAME ## _proc;\
+void \
+FNAME ## init ()\
+{\
+ FNAME ## _proc \
+    = scm_c_define_gsubr (PRIMNAME,REQ, OPT, VAR, (Scheme_function_unknown) FNAME);\
+  ly_add_function_documentation (PRIMNAME, #ARGLIST,  DOCSTRING);\
+}\
+ADD_SCM_INIT_FUNC (FNAME ## init_unique_prefix, FNAME ## init);\
+SCM \
+FNAME ARGLIST\
+
+
+
 #endif // LILY_GUILE_HH
index 246cf4ba21f76e65eedbab35adb2415fd2d0beff..b81c610f315283498716c1eac80f2c0176a36d42 100644 (file)
@@ -18,7 +18,7 @@
 
 struct Lookup
 {
-  static Molecule bracket (Axis a, Interval iv, Direction d, Real thick, Real protude);
+  static Molecule bracket (Axis a, Interval iv, Real thick, Real protude);
   static Molecule accordion (SCM arg, Real interline_f, Font_metric*fm);
   static Molecule frame (Box b, Real thick);
   static Molecule slur (Bezier controls, Real cthick, Real thick);
index f5b8f62c10849711af81da720f10722bfb34e5e3..b82378dc1b1591a7f3c5b372b467b90b029493e6 100644 (file)
@@ -17,6 +17,7 @@
 void init_type_p_ ## CL ()\
 {\
   scm_c_define_gsubr (FUNCNAME, 1, 0, 0, (Scheme_function_unknown) CL::smob_p);\
+  ly_add_function_documentation (FUNCNAME, "(SCM x)", "Check if @var{x} is a " #CL " object");\
 }\
 ADD_SCM_INIT_FUNC (init_type_p_ ## CL, init_type_p_ ## CL)
 
index 9d9ac24b942f46eb3b4aa47a59d43cfc26078dd0..fd4833d71fe3b7c65d172f91bdd72ecde9007cfb 100644 (file)
     init the molecule, we assume that
     DIMENSIONS = (Interval (0,0),Interval (0,0)
 */
-class Molecule {
+class Molecule
+{
+  friend SCM ly_set_molecule_extent_x (SCM, SCM, SCM);
+  
   Box dim_;
   SCM expr_;
   
index 7bcb40fc8ac1965252637352e1f48999648d9bb2..6d1bfe878bd0021f469e121fbb10c04086c251bf 100644 (file)
 #include "interpretation-context-handle.hh"
 #include "cxx-function-smob.hh"
 
-/** 
+/**
+   ---
+
+   Music_iterator is an object type that traverses the Music structure and
+   reports the events it finds to interpretation contexts. It is not yet
+   user-serviceable.
+
+
+   ---
+       
   Conceptually a music-iterator operates on a queue of musical events
   that are pending. This queue does not actually exist, but it is a
   way of viewing and traversing music-expressions.
index d734189314ad686305e724bfb9c7fedf9770a80b..fca3791ee9d4eacd2d05779afecc92bc7803736d 100644 (file)
@@ -62,7 +62,7 @@ public:
   /// return pitch from central c (in halfnotes)
   int semitone_pitch () const; 
   String str () const;
-  static SCM transpose (SCM,SCM);
+  
 
 
   SCM smobbed_copy () const;
@@ -71,7 +71,7 @@ public:
 
 
 };
-SCM pitch_transpose (SCM p, SCM delta);
+SCM ly_pitch_transpose (SCM p, SCM delta);
 DECLARE_UNSMOB(Pitch,pitch);
 
 #include "compare.hh"
index fa0854866814777c911a9015539f6c9dab64dc26..ff707e9218820557f8e288f09cccfbfa7e1ccd63 100644 (file)
@@ -46,8 +46,6 @@ public:
 
   
   Translator_group * daddy_trans_l_ ;
-  DECLARE_SCHEME_CALLBACK(name, (SCM trans));
-  DECLARE_SCHEME_CALLBACK(description,(SCM trans));
   void announces ();
 
   void removal_processing ();
index af9180a744f58a534028bc775de1b0d08c0c0a43..bbd6f34dc3144995680c20c3754f0b54ecadc399 100644 (file)
@@ -39,14 +39,16 @@ free_smob (SCM s)
   We don't use IMPLEMENT_TYPE_P, since the smobification part is
   implemented separately from the class.
  */
-SCM
-ly_input_p (SCM x)
+LY_DEFINE(ly_input_p, "ly-input-location?", 1, 0, 0,
+         (SCM x),
+         "Return whether @var{x} is an input location")
 {
   return unsmob_input (x) ? SCM_BOOL_T : SCM_BOOL_F ;
 }
 
-SCM
-ly_input_message (SCM sip, SCM msg)
+LY_DEFINE(ly_input_message,  "ly-input-message", 2, 0, 0, (SCM sip, SCM msg),
+         "Print @var{msg} as a GNU compliant error message, pointing to the
+location in @var{sip}.")
 {
   Input *ip  = unsmob_input(sip);
   
@@ -70,10 +72,6 @@ start_input_smobs ()
   scm_set_smob_equalp (input_tag, 0);
 
   
-  scm_c_define_gsubr ("ly-input-location?", 1, 0, 0,
-                     (Scheme_function_unknown)ly_input_p);
-  scm_c_define_gsubr ("ly-input-message", 2, 0, 0,
-                     (Scheme_function_unknown)ly_input_message);
 }
 
 SCM
index b9915bcc6fff2608a04101452c14c2f51d50513c..ac8bc5fd3bdc5121fd639ecfdae60c7fc14f292c 100644 (file)
@@ -148,10 +148,14 @@ gulp_file_to_string (String fn)
   return result;
 }
 
-SCM
-ly_gulp_file (SCM fn)
+LY_DEFINE(ly_gulp_file, "ly-gulp-file", 1,0, 0,
+         (SCM name),
+         "Read the file named @var{name}, and return its contents in a string. The
+file is looked up using the lilypond search path.
+
+")
 {
-  return ly_str02scm (gulp_file_to_string (ly_scm2string (fn)).ch_C ());
+  return ly_str02scm (gulp_file_to_string (ly_scm2string (name)).ch_C ());
 }
 
 
@@ -206,16 +210,19 @@ index_set_cell (SCM s, Direction d, SCM v)
   return s;
 }
   
-SCM
-ly_warning (SCM str)
+LY_DEFINE(ly_warning,"ly-warn", 1, 0, 0,
+  (SCM str),"Scheme callable function to issue the warning @code{msg}.
+")
 {
   assert (gh_string_p (str));
   warning ("lily-guile: " + ly_scm2string (str));
   return SCM_BOOL_T;
 }
 
-SCM
-ly_isdir_p (SCM s)
+LY_DEFINE(ly_isdir_p,  "dir?", 1,0, 0,  (SCM s),
+         "type predicate. A direction is a -1, 0 or 1, where -1 represents left or
+down and 1 represents right or up.
+")
 {
   if (gh_number_p (s))
     {
@@ -405,8 +412,11 @@ ly_type (SCM exp)
  */
    
    
-SCM
-ly_number2string (SCM s)
+LY_DEFINE(ly_number2string,  "ly-number->string", 1, 0,0,
+         (SCM s),
+         " converts @var{num} to a string without generating many decimals. It
+leaves a space at the end.
+")
 {
   assert (gh_number_p (s));
 
@@ -456,23 +466,24 @@ wave_sweep_goodbye (void *dummy1, void *dummy2, void *dummy3)
 
 
 #include "version.hh"
-SCM
-ly_version ()
+LY_DEFINE(ly_version,  "ly-version", 0, 0, 0, (),
+         "Return the current lilypond version as a list, e.g.
+@code{(1 3 127 uu1)}. 
+")
 {
   char const* vs =  "\' (" MAJOR_VERSION " " MINOR_VERSION " "  PATCH_LEVEL " " MY_PATCH_LEVEL ")" ;
   
   return gh_eval_str ((char*)vs);
 }
 
-SCM
-ly_unit ()
+LY_DEFINE(ly_unit,  "ly-unit", 0, 0, 0, (),
+         "Return the unit used for lengths as a string.")
 {
   return ly_str02scm (INTERNAL_UNIT);
 }
 
-
-SCM
-ly_verbose ()
+LY_DEFINE(ly_verbose,  "ly-verbose", 0, 0, 0, (),
+  "Return whether lilypond is being run in verbose mode.")
 {
   return gh_bool2scm (verbose_global_b);
 }
@@ -480,21 +491,6 @@ ly_verbose ()
 static void
 init_functions ()
 {
-  scm_c_define_gsubr ("ly-warn", 1, 0, 0,
-                     (Scheme_function_unknown)ly_warning);
-  scm_c_define_gsubr ("ly-verbose", 0, 0, 0,
-                     (Scheme_function_unknown)ly_verbose);
-  scm_c_define_gsubr ("ly-version", 0, 0, 0,
-                     (Scheme_function_unknown)ly_version);  
-  scm_c_define_gsubr ("ly-unit", 0, 0, 0,
-                     (Scheme_function_unknown)ly_unit);  
-  scm_c_define_gsubr ("ly-gulp-file", 1,0, 0,
-                     (Scheme_function_unknown)ly_gulp_file);
-  scm_c_define_gsubr ("dir?", 1,0, 0, (Scheme_function_unknown)ly_isdir_p);
-  scm_c_define_gsubr ("ly-number->string", 1, 0,0,
-                     (Scheme_function_unknown) ly_number2string);
-
-
 #ifdef TEST_GC 
   scm_c_hook_add (&scm_before_mark_c_hook, greet_sweep, 0, 0);
   scm_c_hook_add (&scm_before_sweep_c_hook, wave_sweep_goodbye, 0, 0);
@@ -738,3 +734,4 @@ ly_split_list (SCM s, SCM list)
   return gh_cons ( scm_reverse_x (before, SCM_EOL),  after);
   
 }
+
index 7c26235b3728aa39137c1ec269ddb405b605b604..e59699292d2832860d07da13db7f7e19dc6a9212 100644 (file)
@@ -531,7 +531,7 @@ Lookup::repeat_slash (Real w, Real s, Real t)
 }
 
 Molecule
-Lookup::bracket (Axis a, Interval iv, Direction d, Real thick, Real protude)
+Lookup::bracket (Axis a, Interval iv, Real thick, Real protude)
 {
   Box b;
   Axis other = Axis((a+1)%2);
@@ -541,8 +541,8 @@ Lookup::bracket (Axis a, Interval iv, Direction d, Real thick, Real protude)
   Molecule m =  filledbox (b);
 
   b[a] = Interval (iv[UP] - thick, iv[UP]);
-  Interval oi = Interval (-thick/2, thick/2 + protude) ;
-  oi *=  d;
+  Interval oi = Interval (-thick/2, thick/2 + fabs (protude)) ;
+  oi *=  sign (protude);
   b[other] = oi;
   m.add_molecule (filledbox (b));
   b[a] = Interval (iv[DOWN], iv[DOWN]  +thick);
@@ -551,25 +551,24 @@ Lookup::bracket (Axis a, Interval iv, Direction d, Real thick, Real protude)
   return m;
 }
 
-SCM
-ly_bracket (SCM a, SCM iv, SCM d, SCM t, SCM p)
+/*
+  TODO: use rounded boxes.
+ */
+LY_DEFINE(ly_bracket ,"ly-bracket",
+         4, 0, 0,
+         (SCM a, SCM iv, SCM t, SCM p),
+         "Make a bracket in direction @var{a}. The extent of the bracket is
+given by @var{iv}. The wings protude by an amount of @var{p}, which
+may be negative. The thickness is given by @var{t}.")
 {
   SCM_ASSERT_TYPE(ly_axis_p (a), a, SCM_ARG1, __FUNCTION__, "axis") ;
-  SCM_ASSERT_TYPE(ly_number_pair_p (iv), iv, SCM_ARG1, __FUNCTION__, "number pair") ;
-  SCM_ASSERT_TYPE(ly_dir_p (d), a, SCM_ARG1, __FUNCTION__, "direction") ;
-  SCM_ASSERT_TYPE(gh_number_p (t), a, SCM_ARG1, __FUNCTION__, "number") ;
-  SCM_ASSERT_TYPE(gh_number_p(p), a, SCM_ARG1, __FUNCTION__, "number") ;
+  SCM_ASSERT_TYPE(ly_number_pair_p (iv), iv, SCM_ARG2, __FUNCTION__, "number pair") ;
+  SCM_ASSERT_TYPE(gh_number_p (t), a, SCM_ARG3, __FUNCTION__, "number") ;
+  SCM_ASSERT_TYPE(gh_number_p(p), a, SCM_ARG4, __FUNCTION__, "number") ;
 
 
   return Lookup::bracket ((Axis)gh_scm2int (a), ly_scm2interval (iv),
-                 (Direction)gh_scm2int (d), gh_scm2double (t), gh_scm2double (p)).smobbed_copy ();
+                         gh_scm2double (t),
+                         gh_scm2double (p)).smobbed_copy ();
 }
   
-static void
-lookup_init ()
-{
-  scm_c_define_gsubr ("ly-bracket", 5, 0, 0, (Scheme_function_unknown) ly_bracket);
-}
-
-ADD_SCM_INIT_FUNC (lookup,lookup_init);
-
index e45bddbcae6e910a6aaf7a60975712d6e30fdc23..9814fc2e04322dd3149d2cc3471d94064f4d86a4 100644 (file)
@@ -135,9 +135,14 @@ Molecule::add_at_edge (Axis a, Direction d, Molecule const &m, Real padding)
   add_molecule (toadd);
 }
 
-/* ly_?  Thought we had the ly_ prefix for wrapping/adding to gh_ */
-SCM
-Molecule::ly_set_molecule_extent_x (SCM mol, SCM axis, SCM np)
+LY_DEFINE(ly_set_molecule_extent_x,"ly-set-molecule-extent!", 3 , 0, 0, 
+         (SCM mol, SCM axis, SCM np),
+         "Set the extent (@var{extent} must be a pair of numbers) of @var{mol} in 
+@var{axis} direction (0 or 1 for x- and y-axis respectively).
+
+Note that an extent @code{(A . B)} is an interval and hence @code{A} is
+smaller than @code{B}, and is often negative.
+5")
 {
   Molecule* m = unsmob_molecule (mol);
   SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "molecule");
@@ -150,8 +155,11 @@ Molecule::ly_set_molecule_extent_x (SCM mol, SCM axis, SCM np)
   return SCM_UNDEFINED;
 }
 
-SCM
-Molecule::ly_get_molecule_extent (SCM mol, SCM axis)
+LY_DEFINE(ly_get_molecule_extent,
+         "ly-get-molecule-extent", 2 , 0, 0,  (SCM mol, SCM axis),
+         "Return a pair of numbers signifying the extent of @var{mol} in
+@var{axis} direction (0 or 1 for x and y axis respectively).
+")
 {
   Molecule *m = unsmob_molecule (mol);
   SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "molecule");
@@ -161,9 +169,14 @@ Molecule::ly_get_molecule_extent (SCM mol, SCM axis)
 }
 
 
-SCM
-Molecule::ly_molecule_combined_at_edge (SCM first, SCM axis, SCM direction,
-                                       SCM second, SCM padding)
+LY_DEFINE(ly_molecule_combined_at_edge,
+         "ly-combine-molecule-at-edge",
+         5 , 0, 0,  (SCM first, SCM axis, SCM direction,
+                     SCM second, SCM padding),
+         "Construct a molecule by putting @var{second} next to
+@var{first}. @var{axis} can be 0 (x-axis) or 1 (y-axis), @var{direction} can be
+-1 (left or down) or 1 (right or up).  @var{padding} specifies extra
+space to add in between measured in global staff space.")
 
 {
   Molecule * m1 = unsmob_molecule (first);
@@ -184,8 +197,13 @@ Molecule::ly_molecule_combined_at_edge (SCM first, SCM axis, SCM direction,
   return result.smobbed_copy ();
 }
 
-SCM
-ly_add_molecule (SCM first, SCM second)
+/*
+  FIXME: support variable number of arguments "
+ */
+LY_DEFINE(ly_add_molecule , 
+         "ly-add-molecule", 2, 0,0,(SCM first, SCM second),
+         "Combine two molecules."
+         )
 {
   Molecule * m1 = unsmob_molecule (first);
   Molecule * m2 = unsmob_molecule (second);
@@ -200,9 +218,9 @@ ly_add_molecule (SCM first, SCM second)
   return result.smobbed_copy ();
 }
 
-
-SCM
-ly_make_molecule (SCM expr, SCM xext, SCM yext)
+LY_DEFINE(ly_make_molecule,
+         "ly-make-molecule", 3, 0, 0,  (SCM expr, SCM xext, SCM yext),
+         "")
 {
   SCM_ASSERT_TYPE (ly_number_pair_p (xext), xext, SCM_ARG2, __FUNCTION__, "number pair");
   SCM_ASSERT_TYPE (ly_number_pair_p (yext), yext, SCM_ARG3, __FUNCTION__, "number pair");  
@@ -222,16 +240,16 @@ fontify_atom (Font_metric * met, SCM f)
                        ly_quote_scm (met->description_), f, SCM_UNDEFINED);
 }
 
-SCM
-ly_fontify_atom (SCM met, SCM f)
+LY_DEFINE(ly_fontify_atom,"ly-fontify-atom", 2, 0, 0, 
+         (SCM met, SCM f),
+         "Add a font selection command for the font metric @var{met} to @var{f}.")
 {
   SCM_ASSERT_TYPE(unsmob_metrics (met), met, SCM_ARG1, __FUNCTION__, "font metric");
 
   return fontify_atom (unsmob_metrics (met), f);
 }
-
-SCM
-ly_align_to_x (SCM mol, SCM axis, SCM dir)
+LY_DEFINE(ly_align_to_x,"ly-align-to!", 3, 0, 0,  (SCM mol, SCM axis, SCM dir),
+         "Align @var{mol} using its own extents.")
 {
   SCM_ASSERT_TYPE(unsmob_molecule (mol), mol, SCM_ARG1, __FUNCTION__, "molecule");
   SCM_ASSERT_TYPE(ly_axis_p(axis), axis, SCM_ARG2, __FUNCTION__, "axis");
@@ -243,19 +261,6 @@ ly_align_to_x (SCM mol, SCM axis, SCM dir)
 }
 
 
-static void
-molecule_init ()
-{
-  scm_c_define_gsubr ("ly-make-molecule", 3, 0, 0, (Scheme_function_unknown) ly_make_molecule);
-  scm_c_define_gsubr ("ly-fontify-atom", 2, 0, 0, (Scheme_function_unknown) ly_fontify_atom);
-  scm_c_define_gsubr ("ly-align-to!", 3, 0, 0, (Scheme_function_unknown) ly_align_to_x);
-  scm_c_define_gsubr ("ly-add-molecule", 2, 0,0,(Scheme_function_unknown) ly_add_molecule);
-  scm_c_define_gsubr ("ly-combine-molecule-at-edge", 5 , 0, 0, (Scheme_function_unknown) Molecule::ly_molecule_combined_at_edge);
-  scm_c_define_gsubr ("ly-set-molecule-extent!", 3 , 0, 0, (Scheme_function_unknown) Molecule::ly_set_molecule_extent_x);
-  scm_c_define_gsubr ("ly-get-molecule-extent", 2 , 0, 0, (Scheme_function_unknown) Molecule::ly_get_molecule_extent);
-}
-ADD_SCM_INIT_FUNC (molecule,molecule_init);
-
 
 /*
   Hmm... maybe this is not such a good idea ; stuff can be empty,
@@ -284,9 +289,8 @@ IMPLEMENT_SIMPLE_SMOBS (Molecule);
 
 
 int
-Molecule::print_smob (SCM s, SCM port, scm_print_state *)
+Molecule::print_smob (SCM , SCM port, scm_print_state *)
 {
-     
   scm_puts ("#<Molecule ", port);
 #if 0
   Molecule  *r = (Molecule *) ly_cdr (s);
index 97c8e067da269edccd2ff7282f0561ab70191bee..3c504ecc04030bbd0433c14918dd122d7e7f243a 100644 (file)
@@ -48,8 +48,15 @@ Moment::print_smob (SCM s, SCM port, scm_print_state *)
 /*
   TODO: add optional factor argument.
  */
-SCM
-make_rational (SCM n, SCM d)
+LY_DEFINE (make_moment,"make-moment", 2,0,0, (SCM n, SCM d),
+          "create the rational number with main timing @var{n}/@var{d}. 
+
+
+Moment is a point in musical time. It is consists of a pair of
+rationals (@var{m},@var{g}), where @var{m} is the timing for the  main
+notes, and @var{g} the timing for  grace notes. In absence of grace
+notes, @var{g} is zero.
+")
 {
   Moment m (Rational (1,1));
 
@@ -65,15 +72,6 @@ make_rational (SCM n, SCM d)
   return m.smobbed_copy ();
 }
 
-
-void
-init_moments ()
-{
-  scm_c_define_gsubr ("make-moment", 2 , 0, 0, (Scheme_function_unknown) make_rational);
-}
-
-ADD_SCM_INIT_FUNC (moms,init_moments);
-
 SCM
 Moment::equal_p (SCM a, SCM b)
 {
index 5d7e57754bcc4cd4f22a4026bbab6abec290b739..69364a2a3ff21cef2a419b14eed69b78c183281e 100644 (file)
@@ -206,8 +206,9 @@ Music::~Music ()
   
 }
 
-SCM
-ly_get_mus_property (SCM mus, SCM sym)
+LY_DEFINE(ly_get_mus_property,
+         "ly-get-mus-property", 2, 0, 0,  (SCM mus, SCM sym),
+         "Get the property @var{sym} of music expression @var{mus}.")
 {
   Music * sc = unsmob_music (mus);
   SCM_ASSERT_TYPE(sc, mus, SCM_ARG1, __FUNCTION__, "grob");
@@ -217,9 +218,10 @@ ly_get_mus_property (SCM mus, SCM sym)
 
 }
 
-
-SCM
-ly_set_mus_property (SCM mus, SCM sym, SCM val)
+LY_DEFINE(ly_set_mus_property,
+         "ly-set-mus-property", 3, 0, 0,
+         (SCM mus, SCM sym, SCM val),
+         "Set property @var{sym} in music expression @var{mus} to @var{val}.")
 {
   Music * sc = unsmob_music (mus);
   SCM_ASSERT_TYPE(sc, mus, SCM_ARG1, __FUNCTION__, "grob");
@@ -236,8 +238,17 @@ ly_set_mus_property (SCM mus, SCM sym, SCM val)
 
 
 // to do  property args 
-SCM
-ly_make_music (SCM type)
+LY_DEFINE(ly_make_music,
+         "ly-make-music", 1, 0, 0,  (SCM type),
+         "
+Make a music object/expression of type @var{name}. Warning: this
+interface will likely change in the near future.
+
+
+
+Music is the data type that music expressions are stored in. The data
+type does not yet offer many manipulations.
+")
 {
   SCM_ASSERT_TYPE(gh_string_p(type), type, SCM_ARG1, __FUNCTION__, "string");
   
@@ -248,8 +259,9 @@ ly_make_music (SCM type)
   return s;
 }
 
-SCM
-ly_music_name (SCM mus)
+LY_DEFINE(ly_music_name, "ly-music-name", 1, 0, 0, 
+  (SCM mus),
+  "Return the name of @var{music}.")
 {
   Music * m = unsmob_music (mus);
   SCM_ASSERT_TYPE(m, mus, SCM_ARG1, __FUNCTION__ ,"music");
@@ -258,8 +270,8 @@ ly_music_name (SCM mus)
   return ly_str02scm (nm);
 }
 
-SCM
-ly_music_list_p (SCM l)
+LY_DEFINE(ly_music_list_p,"music-list?", 1, 0, 0, 
+  (SCM l),"Type predicate: return true if @var{l} is a list of music objects.")
 {
   if (scm_list_p (l) != SCM_BOOL_T)
     return SCM_BOOL_F;
@@ -272,15 +284,4 @@ ly_music_list_p (SCM l)
     }
   return SCM_BOOL_T;
 }
-
-static void
-init_functions ()
-{
-  scm_c_define_gsubr ("music-list?", 1, 0, 0, (Scheme_function_unknown)ly_music_list_p);  
-  scm_c_define_gsubr ("ly-get-mus-property", 2, 0, 0, (Scheme_function_unknown)ly_get_mus_property);
-  scm_c_define_gsubr ("ly-set-mus-property", 3, 0, 0, (Scheme_function_unknown)ly_set_mus_property);
-  scm_c_define_gsubr ("ly-make-music", 1, 0, 0, (Scheme_function_unknown)ly_make_music);
-  scm_c_define_gsubr ("ly-music-name", 1, 0, 0, (Scheme_function_unknown)ly_music_name);    
-}
-ADD_SCM_INIT_FUNC (musicscm,init_functions);
 ADD_MUSIC(Music);
index 8bcfcb4e3a5d53b3385e567cc8396c0724b3fda8..79a1b66635f4eae8a472cf9202fa8a650ced3f5e 100644 (file)
@@ -219,14 +219,13 @@ Pitch::down_to (int notename)
     }
   notename_i_ = notename;
 }
-
-/*
-  can't use macro MAKE_SCHEME_CALLBACK().
-   messy stuff since Pitch::transpose is overloaded.
- */
-
-SCM
-pitch_transpose (SCM p, SCM delta)
+LY_DEFINE(ly_pitch_transpose,
+         "ly-transpose-pitch", 2, 0, 0,
+         (SCM p, SCM delta),
+         "Transpose @var{p} by the amount @var{delta}, where @var{delta} is the
+pitch that central C is transposed to.
+")
 {
   Pitch* t = unsmob_pitch (p);
   Pitch *d = unsmob_pitch (delta);
@@ -238,12 +237,6 @@ pitch_transpose (SCM p, SCM delta)
   return tp.smobbed_copy ();
 }
 
-SCM
-Pitch::transpose (SCM p, SCM d)
-{
-  return pitch_transpose (p,d);
-}
-
 /****************************************************************/
 
 
@@ -297,8 +290,16 @@ Pitch::less_p (SCM p1, SCM p2)
 /*
   should add optional args
  */
-static SCM
-make_pitch (SCM o, SCM n, SCM a)
+
+LY_DEFINE(make_pitch, "make-pitch", 3, 0, 0, 
+         (SCM o, SCM n, SCM a),
+         "
+@var{octave} is specified by an integer, zero for the octave containing
+middle C.  @var{note} is a number from 0 to 6, with 0 corresponding to C
+and 6 corresponding to B.  The shift is zero for a natural, negative for
+flats, or positive for sharps.
+
+")
 {
   SCM_ASSERT_TYPE(gh_number_p(o), o, SCM_ARG1, __FUNCTION__, "number");
   SCM_ASSERT_TYPE(gh_number_p(n), n, SCM_ARG2, __FUNCTION__, "number");
@@ -308,8 +309,10 @@ make_pitch (SCM o, SCM n, SCM a)
   return p.smobbed_copy ();
 }
 
-static SCM
-pitch_octave (SCM pp)
+
+LY_DEFINE(pitch_octave, "pitch-octave", 1, 0, 0, 
+         (SCM pp),
+         "extract the octave from pitch @var{p}.")
 {
   Pitch *p = unsmob_pitch (pp);
    SCM_ASSERT_TYPE(p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
@@ -318,8 +321,9 @@ pitch_octave (SCM pp)
   return gh_int2scm (q);
 }
 
-static SCM
-pitch_alteration (SCM pp)
+LY_DEFINE(pitch_alteration, "pitch-alteration", 1, 0, 0, 
+         (SCM pp),
+         "extract the alteration from pitch  @var{p}.")
 {
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE(p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
@@ -328,8 +332,9 @@ pitch_alteration (SCM pp)
   return gh_int2scm (q);
 }
 
-static SCM
-pitch_notename (SCM pp)
+LY_DEFINE(pitch_notename, "pitch-notename", 1, 0, 0, 
+         (SCM pp),
+         "extract the note name from pitch  @var{pp}.")
 {
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE(p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
@@ -338,8 +343,9 @@ pitch_notename (SCM pp)
   return gh_int2scm (q);
 }
 
-static SCM
-pitch_semitones (SCM pp)
+LY_DEFINE(pitch_semitones,  "pitch-semitones", 1, 0, 0, 
+         (SCM pp),
+         "calculate the number of semitones of @var{p} from central C.")
 {
   Pitch *p = unsmob_pitch (pp);
    SCM_ASSERT_TYPE(p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
@@ -348,29 +354,13 @@ pitch_semitones (SCM pp)
 
   return gh_int2scm (q);
 }
-SCM pitch_less_proc;
-static SCM
-pitch_less (SCM p1, SCM p2)
-{
-  return Pitch::less_p (ly_car (p1),  ly_car (p2));
-}
-
 
-static void
-add_funcs ()
+LY_DEFINE(pitch_less, "pitch<?", 2,0,0, (SCM p1, SCM p2),
+         "Is @var{p1} lower than @var{p2}? This uses lexicographic ordening.")
 {
-  // should take list?: (make-pitch ' (octave name accidental))
-  scm_c_define_gsubr ("make-pitch", 3, 0, 0, (Scheme_function_unknown)make_pitch);
-  scm_c_define_gsubr ("pitch-octave", 1, 0, 0, (Scheme_function_unknown)pitch_octave);
-  scm_c_define_gsubr ("pitch-notename", 1, 0, 0, (Scheme_function_unknown)pitch_notename);
-  scm_c_define_gsubr ("pitch-alteration", 1, 0, 0, (Scheme_function_unknown)pitch_alteration);
-  scm_c_define_gsubr ("pitch-semitones", 1, 0, 0, (Scheme_function_unknown)pitch_semitones);
-  scm_c_define_gsubr ("Pitch::transpose", 2, 0, 0, (Scheme_function_unknown) pitch_transpose);
-  pitch_less_proc = gh_new_procedure2_0 ("pitch-less", &pitch_less);
+  return Pitch::less_p (ly_car (p1),  ly_car (p2));
 }
 
-ADD_SCM_INIT_FUNC (pitch, add_funcs);
-
 SCM
 Pitch::smobbed_copy ()const
 {
index c8d58fe0489c5811a89a463e7a0c93481835f21e..e924020aa78624e2e7fa332c23fe054b45d05849 100644 (file)
@@ -51,8 +51,20 @@ Switch on any experimental features.  Not for general public use.
 
  */
 
-SCM
-set_lily_option (SCM var, SCM val)
+LY_DEFINE(set_lily_option,"set-lily-option", 2, 0, 0,  (SCM var, SCM val),
+         "Set a global option for the program. Supported options  include
+
+
+@table @code
+@item help
+List all options.
+@item midi-debug
+If set to true, generate human  readable MIDI
+@end table
+
+This function is useful to call from the command line: @code{lilypond -e
+\"(set-lily-option 'midi-debug #t)\"}.
+")
 {
   /*
     Scheme option usage:
@@ -114,13 +126,5 @@ possible options for SYMBOL are :
 }
 
 
-static void
-init_functions ()
-{
-  scm_c_define_gsubr ("set-lily-option", 2, 0, 0, (Scheme_function_unknown)set_lily_option);
-}
-
-
-ADD_SCM_INIT_FUNC (init_functions_sopt, init_functions);
 
 
index dce65a693192f8420dc14a2da9cd169721070d00..1a789591ea35f0b724a05957ed362f5edddb162f 100644 (file)
@@ -260,23 +260,6 @@ System::break_into_pieces (Array<Column_x_positions> const &breaking)
 }
 
 
-#define GLOBAL_SYMBOL(cname, name)  \
-SCM cname ;                                    \
-void \
-cname ## _init_func ()                         \
-{                                              \
-  cname = ly_symbol2scm (name);                        \
-  scm_permanent_object (cname);                        \
-}                                              \
-ADD_SCM_INIT_FUNC (cname,cname ## _init_func);\
-
-
-GLOBAL_SYMBOL (offset_sym , "translate-molecule");
-GLOBAL_SYMBOL (placebox_sym , "placebox");
-GLOBAL_SYMBOL (combine_sym , "combine-molecule");
-
-
-
 void
 System::output_molecule (SCM expr, Offset o)
 {
@@ -317,7 +300,7 @@ System::output_molecule (SCM expr, Offset o)
       else
        {
          pscore_l_->outputter_l_->
-           output_scheme (scm_list_n (placebox_sym,
+           output_scheme (scm_list_n (ly_symbol2scm ("placebox"),
                                    gh_double2scm (o[X_AXIS]),
                                    gh_double2scm (o[Y_AXIS]),
                                    expr,
index 9f2f4aa3178a30db36a86d58970283796d76780f..849a73248582c301f1ac8b332d3943d869002694 100644 (file)
@@ -19,9 +19,9 @@
  */
 Dictionary<Translator*> *global_translator_dict_p=0;
 
-
-SCM
-ly_get_all_translators ()
+LY_DEFINE(ly_get_all_translators,"ly-get-all-translators", 0, 0, 0,  (),
+         "Return an list of a all translator objects that may be instantiated
+during a lilypond run.")
 {
   SCM l = SCM_EOL;
   for (std::map<String,Translator*>::const_iterator (ci (global_translator_dict_p->begin()));
@@ -32,14 +32,6 @@ ly_get_all_translators ()
   return l;
 }
 
-static void
-all_trans_init()
-{
-  scm_c_define_gsubr ("ly-get-all-translators", 0, 0, 0, (Scheme_function_unknown) ly_get_all_translators);
-}
-
-ADD_SCM_INIT_FUNC(all_trans_init,all_trans_init);
-
 void
 add_translator (Translator *t)
 {
index aee0c2309c1638d24e35ab2b2e6e6ec8858d5ac0..3ce7279c4183ba3194588c82db5e1b899e384efa 100644 (file)
@@ -418,9 +418,10 @@ Translator_group::finalize ()
   each (&Translator::removal_processing);
 }
 
-
-SCM
-ly_get_trans_property (SCM context, SCM name)
+LY_DEFINE(ly_get_context_property,
+         "ly-get-context-property", 2, 0, 0,
+         (SCM context, SCM name),
+         "retrieve the value of @var{sym} from context @var{tr}")
 {
   Translator *t = unsmob_translator (context);
   Translator_group* tr=   dynamic_cast<Translator_group*> (t);
@@ -430,27 +431,18 @@ ly_get_trans_property (SCM context, SCM name)
   return tr->internal_get_property (name);
   
 }
-SCM
-ly_set_trans_property (SCM context, SCM name, SCM val)
+
+LY_DEFINE(ly_set_context_property,
+         "ly-set-context-property", 3, 0, 0,
+         (SCM context, SCM name, SCM val),
+         "set value of property @var{sym} in context @var{tr} to @var{val}.
+")
 {
   Translator *t = unsmob_translator (context);
   Translator_group* tr=   dynamic_cast<Translator_group*> (t);
 
-  SCM_ASSERT_TYPE(tr, context, SCM_ARG1, __FUNCTION__, "Translator group");
+  SCM_ASSERT_TYPE(tr, context, SCM_ARG1, __FUNCTION__, "Context");
   tr->internal_set_property (name, val);
 
   return SCM_UNSPECIFIED;
 }
-
-
-
-
-void
-add_trans_scm_funcs ()
-{
-  scm_c_define_gsubr ("ly-get-trans-property", 2, 0, 0, (Scheme_function_unknown)ly_get_trans_property);
-  scm_c_define_gsubr ("ly-set-trans-property", 3, 0, 0, (Scheme_function_unknown)ly_set_trans_property);
-}
-
-ADD_SCM_INIT_FUNC (trans_scm, add_trans_scm_funcs);
-
index 8ccda6bb79f4167d0846560d278b9c91f4b5644b..bdd21e58636e0b9b5167cc19cd0ad3654faf3cc4 100644 (file)
@@ -139,30 +139,27 @@ Translator::mark_smob (SCM sm)
   return me->properties_scm_;
 }
 
-MAKE_SCHEME_CALLBACK(Translator,name,1);
-SCM
-Translator::name (SCM trans) 
+LY_DEFINE(ly_translator_name,
+         "ly-translator-name", 1,0,0,  (SCM trans),
+         "Return the type name of the translator @var{trans}.
+")
 {
-  if (unsmob_translator (trans))
-    {
-      char const* nm = classname (unsmob_translator (trans));
-      return ly_str02scm (nm);
-    }
-  return
-    SCM_EOL;
+  Translator* tr =  unsmob_translator (trans);
+  SCM_ASSERT_TYPE(tr, trans, SCM_ARG1, __FUNCTION__, "Context");
+
+  char const* nm = classname (tr);
+  return ly_str02scm (nm);
 }
 
-MAKE_SCHEME_CALLBACK(Translator,description,1)
-SCM
-Translator::description (SCM me) 
+LY_DEFINE(ly_translator_description,
+         "ly-translator-description",
+         1,0,0, (SCM me),
+         "Return an alist of properties of  translator @var{me}.")
 {
-  if (unsmob_translator (me))
-    return unsmob_translator(me)->translator_description ();
-  else
-    {
-      programming_error ("Translator::description ()");  
-      return SCM_EOL;
-    }
+  Translator *tr =unsmob_translator (me);
+  SCM_ASSERT_TYPE (tr, me, SCM_ARG1, __FUNCTION__, "Context");
+
+  return tr->translator_description ();
 }
 
 SCM
@@ -177,7 +174,7 @@ Translator::print_smob (SCM s, SCM port, scm_print_state *)
   Translator *sc = (Translator *) ly_cdr (s);
      
   scm_puts ("#<Translator ", port);
-  scm_display (name (s), port);
+  scm_display (ly_translator_name (s), port);
   scm_display (sc->simple_trans_list_, port);
   /*
     don't try to print properties, that is too much hassle.
index 645c56c92b1ccb203090465f3b9f8c91ea1d287f..3ed112e9d6ff9d653162ccb07fb55a7b22b533a4 100644 (file)
@@ -95,7 +95,7 @@
      (let* ((grob name)
            (engravers (filter-list
                        (lambda (x) (engraver-makes-grob? name x)) all-engravers-list))
-           (engraver-names (map Translator::name engravers))
+           (engraver-names (map ly-translator-name engravers))
            )
 
        (string-append
 
 
 (define (engraver-makes-grob? name-symbol grav)
-  (memq name-symbol (assoc 'grobs-created (Translator::description grav)))
+  (memq name-symbol (assoc 'grobs-created (ly-translator-description grav)))
   )
 
 (define (document-all-grobs name)
        (texi (description-list->texi descs))
        )
     
-    (string-append
-     (node name)
-     (texi-section 1 name #f)
-     texi)
+     texi
   )
   )
 
index f1e67ab88db82e34b0b235a9e9583266c2dafb40..8e554f4efb502593266c551c37bb8858dbf3b70c 100644 (file)
 
   (let* (
         (level (if (eq? where 'context) 3 2))
-        (propsr (cdr (assoc 'properties-read (Translator::description engraver))))
-        (propsw (cdr (assoc 'properties-written (Translator::description engraver))))   
-        (name (Translator::name engraver))
+        (propsr (cdr (assoc 'properties-read (ly-translator-description engraver))))
+        (propsw (cdr (assoc 'properties-written (ly-translator-description engraver))))         
+        (name (ly-translator-name engraver))
         (name-sym (string->symbol name))
-        (desc (cdr (assoc 'description (Translator::description engraver))))
+        (desc (cdr (assoc 'description (ly-translator-description engraver))))
         (grobs (engraver-grobs engraver))
         )
 
@@ -78,7 +78,7 @@
 
 ;; First level Engraver description
 (define (document-separate-engraver top grav)
-  (let ((name (Translator::name grav)))
+  (let ((name (ly-translator-name grav)))
     (processing name)
     (string-append
      (node (engraver-name name))
@@ -88,7 +88,7 @@
 (define (find-engraver-by-name name list)
   (if (null? list)
       #f
-      (if (equal? name (Translator::name (car list)))
+      (if (equal? name (ly-translator-name (car list)))
          (car list)
          (find-engraver-by-name name (cdr list)))))
 
 
     (if (eq? eg #f)
        '()
-       (map symbol->string (cdr (assoc 'grobs-created (Translator::description eg))))
+       (map symbol->string (cdr (assoc 'grobs-created (ly-translator-description eg))))
        )
   ))
 
 (define all-engravers-list  (ly-get-all-translators))
 (define (document-all-engravers name)
   (let* ((gravs all-engravers-list)
-        (names (map Translator::name gravs))
+        (names (map ly-translator-name gravs))
         (doc (apply string-append
                     (map (lambda (x) (document-separate-engraver name x))
                          gravs))))
index 18afa60d6e89b0ba43a850c4322e11952bf0a390..baa021cbfff823ceed6650128013547fb61a9c46 100644 (file)
 ;;;;;;;;;;;;;;;;
 
 (define load-files '("documentation-lib.scm"
+                    "function-documentation.scm"
                     "engraver-documentation-lib.scm"
                     "music-documentation-lib.scm"
-                    "backend-documentation-lib.scm"))
+                    "backend-documentation-lib.scm"
+                    ))
 
 (map load-from-path load-files)
 
 
 
 (let* ((doc (string-append
-            (document-music "LilyPond music properties") 
-            (document-paper "LilyPond interpretation contexts")
-            (document-all-engravers "LilyPond engravers")
-            (document-all-engraver-properties "LilyPond context properties")
-            (document-all-grobs "LilyPond backend")
-            (document-all-interfaces "LilyPond interfaces")
-            (document-all-backend-properties "LilyPond backend properties")
+            (document-music "music properties") 
+            (document-paper "interpretation contexts")
+            (document-all-engravers "engravers")
+            (document-all-engraver-properties "context properties")
+            (document-all-grobs "backend")
+            (document-all-interfaces "interfaces")
+
+            (node "backend properties")
+            (texi-section 1 "backend properties" #f)
+
+            (document-all-backend-properties "backend properties")
+
+            (node "function documentation")
+            (texi-section 1 "function documentation" #f)
+
+            (document-all-scheme-functions)
+            
             )
        )
        (name "lilypond-internals")
      ;; we can't use (dir) and top if we're included by lilypond.tely
      "LilyPond internals" name "(lilypond.info)"
      '(
-       ("LilyPond music properties" . "properties for Music representation")
-       ("LilyPond interpretation contexts" . "Hierarchy and grouping of Engravers")
-       ("LilyPond engravers" . "Engravers create Grobs")
-       ("LilyPond context properties" . "context properties")       
-       ("LilyPond backend" . "Detailed description of all Grobs")
-       ("LilyPond interfaces" . "Grob Interfaces")
-       ("LilyPond backend properties" . "Grob properties")
+       ("music properties" . "properties for Music representation")
+       ("interpretation contexts" . "Hierarchy and grouping of Engravers")
+       ("engravers" . "Engravers create Grobs")
+       ("context properties" . "context properties")       
+       ("backend" . "Detailed description of all Grobs")
+       ("interfaces" . "Grob Interfaces")
+       ("backend properties" . "Grob properties")
+       ("function documentation" . "Grob properties")       
        ("Index" . "index")
        ))
 
index e13bbc4893d901e77eafe713bf4f7e263d130066..f0ee68c9023e06a1349d93544b1f0d81242c2232 100644 (file)
@@ -29,8 +29,8 @@
 
   (let* (
         (ext (ly-get-molecule-extent mol axis))
-        (lb (ly-bracket axis ext -1 thick protusion))
-        (rb (ly-bracket axis ext thick protusion))
+        (lb (ly-bracket axis ext thick (- protusion)))
+        (rb (ly-bracket axis ext thick protusion))
         )
     (set! mol (ly-combine-molecule-at-edge mol (other-axis  axis) 1 lb padding))
     (set! mol (ly-combine-molecule-at-edge mol (other-axis  axis) -1 rb padding))
index 4ea8a92838c889e8d684a13dc183ff9f9b74cf62..073e0ecd972d9babe5dea50cc80b43b89a817943 100644 (file)
@@ -848,6 +848,15 @@ if 1:
        
        conversions.append (((1,5,49), conv, 'noAutoBeaming -> autoBeaming'))
 
+
+if 1:
+       def conv (str):
+               str = re.sub ('Pitch::transpose', 'ly-transpose-pitch', str)
+
+               return str
+       
+       conversions.append (((1,5,56), conv, 'Pitch::transpose->ly-transpose-pitch'))
+
 ################################
 #      END OF CONVERSIONS      
 ################################