# HG changeset patch # User John W. Eaton # Date 1234762705 18000 # Node ID d1eed318100f3ac3d370f3d7c7e11b2ce890539d # Parent 86cfcf133a19501a772950d72841c6211a5abbb8 help.m: shorten default help text diff -r 86cfcf133a19 -r d1eed318100f scripts/ChangeLog --- a/scripts/ChangeLog Mon Feb 16 00:09:44 2009 -0500 +++ b/scripts/ChangeLog Mon Feb 16 00:38:25 2009 -0500 @@ -1,3 +1,7 @@ +2009-02-16 John W. Eaton + + * help/help.m: Shorten default help text. + 2009-02-15 John W. Eaton * help/doc.m, help/help.m, help/lookfor.m, help/type.m, diff -r 86cfcf133a19 -r d1eed318100f scripts/help/help.m --- a/scripts/help/help.m Mon Feb 16 00:09:44 2009 -0500 +++ b/scripts/help/help.m Mon Feb 16 00:38:25 2009 -0500 @@ -30,23 +30,27 @@ ## @end deftypefn function help (name) + if (nargin == 0) - disp ("Help is available for the topics listed below."); - disp (""); - - disp ("*** operators:"); - operators = __operators__ (); - disp (list_in_columns (operators (:, 1))); - disp ("*** reserved words:"); - keywords = __keywords__ (); - disp (list_in_columns (keywords (:, 1))); + puts ("\n\ + For help with individual commands and functions type\n\ +\n\ + help NAME\n\ +\n\ + (replace NAME with the name of the command or function you would\n\ + like to learn more about).\n\ +\n\ + For a more detailed introduction to GNU Octave, please consult the\n\ + manual. To read the manual from the prompt type\n\ +\n\ + doc\n\ +\n\ + GNU Octave is supported and developed by its user community.\n\ + For more information visit http://www.octave.org.\n\n"); - disp ("*** available functions:"); - functions = __list_functions__ (); - disp (list_in_columns (functions)); - elseif (nargin == 1 && ischar (name)) + ## Get help text [text, format] = get_help_text (name); @@ -71,16 +75,16 @@ ## Print text if (status != 0) - warning ("makeinfo: Texinfo formatting filter exited abnormally"); - warning ("makeinfo: raw Texinfo source of help text follows...\n"); + warning ("makeinfo: Texinfo formatting filter exited abnormally; raw Texinfo source of help text follows...\n"); endif which (name); printf ("\n%s\n%s", text, __additional_help_message__ ()); - + else error ("help: invalid input\n"); endif + endfunction function [text, status] = do_contents (name) @@ -110,4 +114,3 @@ end_unwind_protect endif endfunction -