X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fprogram-option.cc;h=552987904bcddd015d3d2b581dd6b7d6ebd0eb77;hb=4953a582bab48171cab4261f744275c55daffef7;hp=de2065041d50776e5b50a9407cf0c2e74e3697d4;hpb=d11056c687720e610a40f69e6f6ec32525751ff2;p=lilypond.git diff --git a/lily/program-option.cc b/lily/program-option.cc index de2065041d..552987904b 100644 --- a/lily/program-option.cc +++ b/lily/program-option.cc @@ -71,6 +71,9 @@ const int HELP_INDENT = 30; const int INDENT = 2; const int SEPARATION = 5; +/* + Hmmm. should do in SCM / C++ ? + */ static String get_help_string () { @@ -78,7 +81,8 @@ get_help_string () SCM convertor = ly_lily_module_constant ("scm->string"); - String help ("Options supported by ly:set-option\n\n"); + Array opts; + for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s)) { SCM sym = scm_caar (s); @@ -105,9 +109,14 @@ get_help_string () String ("\n") + String_convert::char_string (' ', HELP_INDENT)); - help += opt_spec + opt_help + "\n"; + opts.push (opt_spec + opt_help + "\n"); } - + + String help ("Options supported by ly:set-option\n\n"); + opts.sort (String::compare); + for (int i = 0; i < opts.size (); i++) + help += opts[i]; + help += String ("\n"); return help; }