# HG changeset patch # User Carlo de Falco # Date 1352735280 -3600 # Node ID d58db82c599a5604314a82f75e4cccf6844aa450 # Parent 61d08b092a9db762a4e278dd5be019d4223d310c Use texinfo syntax in default m-file template. scripts/miscellaneous/edit.m: use texinfo syntax for the docstring template in newly created m-files. diff --git a/scripts/miscellaneous/edit.m b/scripts/miscellaneous/edit.m --- a/scripts/miscellaneous/edit.m +++ b/scripts/miscellaneous/edit.m @@ -486,14 +486,18 @@ if (any (exists == [2, 103])) body = type (name){1}; else - body = cstrcat ("function [ ret ] = ", name, " ()\n\nendfunction\n"); + body = cstrcat ("function [ret] = ", name, " ()\n\nendfunction\n"); endif if (isempty (head)) - comment = cstrcat ("## ", name, "\n\n", + comment = cstrcat ("## -*- texinfo -*- \n## @deftypefn {Function File}", + "address@hidden =}", name, "(@var{x}, @var{y})\n##\n", + "## @seealso{}\n## @end deftypefn\n\n", "## ", strrep (tail, "\n", "\n## "), "\n\n"); else comment = cstrcat ("## ", strrep (head,"\n","\n## "), "\n\n", ... - "## ", name, "\n\n", ... + "## -*- texinfo -*- \n## @deftypefn {Function File}", + "address@hidden =}", name, "(@var{x}, @var{y})\n##\n", + "## @seealso{}\n## @end deftypefn\n\n", "## ", strrep (tail, "\n", "\n## "), "\n\n"); endif text = cstrcat (comment, body);