diff scripts/help/help.m @ 11215:8b2a47a99701

help: print message if function not found
author John W. Eaton <jwe@octave.org>
date Tue, 09 Nov 2010 14:52:28 -0500
parents 2c356a35d7f5
children fd0a3ac60b0e
line wrap: on
line diff
--- a/scripts/help/help.m
+++ b/scripts/help/help.m
@@ -129,7 +129,13 @@
   if (found)
     puts (__additional_help_message__ ());
   else
-    feval (missing_function_hook, name);
+    msg = feval (missing_function_hook, name);
+
+    if (isempty (msg))
+      msg = sprintf ("`%s' not found", name);
+    endif
+
+    error ("help: %s\n", msg);
   endif
 
 endfunction