# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1273584810 18000 # Node ID ad7301aa548c4057e5b1536ef7d61b2124a3c4a0 # Parent 483dbafc518cc24d8e473dc4e98e208c65099c13 Make help return its docstring diff -r 483dbafc518c -r ad7301aa548c scripts/help/help.m --- a/scripts/help/help.m Tue May 11 08:31:58 2010 +0200 +++ b/scripts/help/help.m Tue May 11 08:33:30 2010 -0500 @@ -29,7 +29,7 @@ ## @seealso{doc, lookfor, which} ## @end deffn -function help (name) +function docstring = help (name) if (nargin == 0) @@ -79,6 +79,10 @@ which (name); printf ("\n%s\n%s", text, __additional_help_message__ ()); + if(nargout == 1) + docstring = text; + endif; + else error ("help: invalid input\n"); endif