changeset 17864:674e5eb2c709

edit.m: Use more meaningful variable names in default function body. * scripts/miscellaneous/edit.m: Use "input1", "input2" instead of "x", "y" in default m-file function body used for a blank file.
author Rik <rik@octave.org>
date Wed, 06 Nov 2013 15:56:12 -0800
parents 0676fae19b8b
children dde06c2ac6c6
files scripts/miscellaneous/edit.m
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/edit.m	Wed Nov 06 15:21:49 2013 -0800
+++ b/scripts/miscellaneous/edit.m	Wed Nov 06 15:56:12 2013 -0800
@@ -414,7 +414,7 @@
 GNU General Public License for more details.\n\
 \n\
 You should have received a copy of the GNU General Public License\n\
-along with this program  If not, see <http://www.gnu.org/licenses/>.\
+along with this program.  If not, see <http://www.gnu.org/licenses/>.\
 ");
         tail = [author, "\n", revs];
 
@@ -482,17 +482,20 @@
         if (any (exists == [2, 103]))
           body = type (name){1};
         else
-          body = ["function [retval] = " name " ()\n\nendfunction\n"];
+          body = ["function [retval] = " name " (input1, input2)\n\n" ...
+                  "endfunction\n"];
         endif
         if (isempty (head))
           comment = ["## -*- texinfo -*- \n## @deftypefn {Function File} " ...
-                     "{@var{retval} =} " name " (@var{x}, @var{y})\n##\n"  ...
+                     "{@var{retval} =} " name                              ...
+                     " (@var{input1}, @var{input2})\n##\n"                 ...
                      "## @seealso{}\n## @end deftypefn\n\n"                ...
                      "## " strrep(tail, "\n", "\n## ") "\n\n"];
         else
           comment = ["## " strrep(head,"\n","\n## ") "\n\n"                ...
                      "## -*- texinfo -*- \n## @deftypefn {Function File} " ...
-                     "{@var{retval} =} " name " (@var{x} @var{y})\n##\n"   ...
+                     "{@var{retval} =} " name                              ...
+                     " (@var{input1}, @var{input2})\n##\n"                 ...
                      "## @seealso{}\n## @end deftypefn\n\n"                ...
                      "## " strrep(tail, "\n", "\n## ") "\n\n"];
         endif