(staff_eligible): new function.
[lilypond.git] / lily / function-documentation.cc
blob46dbbfe5720df38e3da4dc805feb8f4a057bbb2b
1 #include "lily-guile.hh"
2 #include "protected-scm.hh"
3 #include "string.hh"
5 static Protected_scm doc_hash_table ;
7 void ly_add_function_documentation (SCM func,
8 char const * fname,
9 char const * varlist,
10 char const * doc)
12 if (!gh_vector_p (doc_hash_table ))
13 doc_hash_table = scm_make_vector (gh_int2scm (59), SCM_EOL);
15 String s = String (" - ") + "LilyPond procedure: " + fname + " " + varlist
16 + "\n" + doc ;
18 scm_set_procedure_property_x (func, ly_symbol2scm ("documentation"),
19 scm_makfrom0str (s.to_str0 ()));
20 SCM entry = gh_cons (scm_makfrom0str (varlist), scm_makfrom0str (doc));
21 scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname), entry);
25 LY_DEFINE(ly_get_all_function_documentation, "ly:get-all-function-documentation",
26 0,0,0, (),
27 "Get a hash table with all lilypond Scheme extension functions.")
29 return doc_hash_table;