Mercurial > hg > octave-nkf
changeset 15612:8b04a7d67d8a
Use texinfo syntax in default m-file template.
scripts/miscellaneous/edit.m: use texinfo syntax
for the docstring template in newly created m-files.
author | Carlo de Falco <cdf@users.sourceforge.net> |
---|---|
date | Mon, 12 Nov 2012 17:44:03 +0100 |
parents | 61d08b092a9d |
children | 126285fce876 |
files | scripts/miscellaneous/edit.m |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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}", + "{@var{ret} =}", 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}", + "{@var{ret} =}", name, "(@var{x}, @var{y})\n##\n", + "## @seealso{}\n## @end deftypefn\n\n", "## ", strrep (tail, "\n", "\n## "), "\n\n"); endif text = cstrcat (comment, body);