2 function-documentation.cc -- Scheme doc strings.
4 source file of the GNU LilyPond music typesetter
6 (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
11 #include "protected-scm.hh"
14 static Protected_scm doc_hash_table;
16 void ly_add_function_documentation (SCM func,
24 if (!scm_is_vector (doc_hash_table))
25 doc_hash_table = scm_make_vector (scm_int2num (59), SCM_EOL);
27 String s = String (" - ") + "LilyPond procedure: " + fname + " " + varlist
30 scm_set_procedure_property_x (func, ly_symbol2scm ("documentation"),
31 scm_makfrom0str (s.to_str0 ()));
32 SCM entry = scm_cons (scm_makfrom0str (varlist), scm_makfrom0str (doc));
33 scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname), entry);
36 LY_DEFINE (ly_get_all_function_documentation, "ly:get-all-function-documentation",
38 "Get a hash table with all lilypond Scheme extension functions.")
40 return doc_hash_table;