* Bug 16328 fixed: typos exists => exist
[scilab.git] / scilab / modules / helptools / macros / help.sci
index bfae44a..efd7068 100644 (file)
@@ -32,14 +32,16 @@ function help(varargin)
             end
 
             if type(key) <> 10 then
-                error(999,msprintf(_("%s: Wrong type for input argument #%d: string expected.\n"),"help",1));
+                error(msprintf(_("%s: Wrong type for input argument #%d: string expected.\n"),"help",1));
             end
 
             // Search a function name
             key=stripblanks(key)
 
             global %helps
-            if or(part(key,1)==["(",")","[","]","{","}","%","''","""",":","*","/","\",".","<",">","&","^","|","~","+","-"]) & exists(key)==0 then
+            symbols = strsplit("()[]{}%''"":*/\.<>&^|~+-")';
+            exceptions = ["%t" "%T" "%f" "%F" "%onprompt"]; // http://bugzilla.scilab.org/15356
+            if or(part(key,1)==symbols) & exists(key)==0 & and(key~=exceptions) then
                 key="symbols";
             end
 
@@ -50,7 +52,7 @@ function help(varargin)
 
             helpbrowser(%helps(:,1), key, getlanguage(), %f);
 
-            // If the function name does not exists then full-text search is done (See Java code)
+            // If the function name does not exist, then full-text search is done (See Java code)
 
         else
             error(msprintf(gettext("%s: The help browser is disabled in %s mode.\n"), "help", getscilabmode()));