diff scripts/miscellaneous/edit.m @ 10635:d1978e7364ad

Print name of function in error() string messages.
author Rik <octave@nomad.inbox5.com>
date Sun, 16 May 2010 22:26:54 -0700
parents 95c3e38098bf
children be55736a0783
line wrap: on
line diff
--- a/scripts/miscellaneous/edit.m	Sun May 16 18:28:59 2010 -0700
+++ b/scripts/miscellaneous/edit.m	Sun May 16 22:26:54 2010 -0700
@@ -172,7 +172,7 @@
       if (strcmp (state, "sync") || strcmp (state, "async"))
         FUNCTION.MODE = state;
       else
-        error('expected "edit MODE sync|async"');
+        error('edit: expected "edit MODE sync|async"');
       endif
     case "EDITINPLACE"
       if (ischar (state))
@@ -192,7 +192,7 @@
         ret = FUNCTION;
       endif
     otherwise
-      error ("expected \"edit EDITOR|HOME|AUTHOR|EMAIL|LICENSE|MODE val\"");
+      error ('edit: expected "edit EDITOR|HOME|AUTHOR|EMAIL|LICENSE|MODE val"');
     endswitch
     return
   endif
@@ -212,7 +212,7 @@
   ## Check whether the user is trying to edit a builtin of compiled function.
   switch (exist (file))
     case {3, 5}
-      error ("unable to edit a built-in or compiled function");
+      error ("edit: unable to edit a built-in or compiled function");
   endswitch
 
   ## Checks for whether the file is