Mercurial > hg > octave-nkf
comparison scripts/miscellaneous/edit.m @ 17245:7babcdb9bc13
Use ... instead of \ for line continuation marker.
* plotimages.m, bsxfun.cc, cellfun.cc, __unimplemented__.m,
importdata.m, textscan.m, edit.m, fsolve.m, sqp.m,
__gnuplot_drawnow__.m, __marching_cube__.m, stemleaf.m, polyfit.m,
z_test.m, z_test_2.m, test.m:
Use ... instead of \ for line continuation marker.
author | Stefan Mahr <dac922@gmx.de> |
---|---|
date | Mon, 12 Aug 2013 17:36:54 +0200 |
parents | c3c1ebfaa7dc |
children | bc924baa2c4e |
comparison
equal
deleted
inserted
replaced
17244:9de751a10910 | 17245:7babcdb9bc13 |
---|---|
466 if (any (exists == [2, 103])) | 466 if (any (exists == [2, 103])) |
467 code = ['\ ', strrep(type(name){1}, "\n", "\n// ")]; | 467 code = ['\ ', strrep(type(name){1}, "\n", "\n// ")]; |
468 else | 468 else |
469 code = " "; | 469 code = " "; |
470 endif | 470 endif |
471 body = ["#include <octave/oct.h>\n\n", \ | 471 body = ["#include <octave/oct.h>\n\n", ... |
472 "DEFUN_DLD(" name ", args, nargout, \"\\\n", \ | 472 "DEFUN_DLD(" name ", args, nargout, \"\\\n", ... |
473 name, "\\n\\\n\")\n{\n", \ | 473 name, "\\n\\\n\")\n{\n", ... |
474 " octave_value_list retval;\n", \ | 474 " octave_value_list retval;\n", ... |
475 " int nargin = args.length ();\n\n", \ | 475 " int nargin = args.length ();\n\n", ... |
476 code, "\n return retval;\n}\n"]; | 476 code, "\n return retval;\n}\n"]; |
477 | 477 |
478 text = [comment, body]; | 478 text = [comment, body]; |
479 case "m" | 479 case "m" |
480 ## If we are editing a function defined on the fly, paste the code. | 480 ## If we are editing a function defined on the fly, paste the code. |
482 body = type (name){1}; | 482 body = type (name){1}; |
483 else | 483 else |
484 body = ["function [retval] = " name " ()\n\nendfunction\n"]; | 484 body = ["function [retval] = " name " ()\n\nendfunction\n"]; |
485 endif | 485 endif |
486 if (isempty (head)) | 486 if (isempty (head)) |
487 comment = ["## -*- texinfo -*- \n## @deftypefn {Function File} " \ | 487 comment = ["## -*- texinfo -*- \n## @deftypefn {Function File} " ... |
488 "{@var{retval} =} " name " (@var{x}, @var{y})\n##\n" \ | 488 "{@var{retval} =} " name " (@var{x}, @var{y})\n##\n" ... |
489 "## @seealso{}\n## @end deftypefn\n\n" \ | 489 "## @seealso{}\n## @end deftypefn\n\n" ... |
490 "## " strrep(tail, "\n", "\n## ") "\n\n"]; | 490 "## " strrep(tail, "\n", "\n## ") "\n\n"]; |
491 else | 491 else |
492 comment = ["## " strrep(head,"\n","\n## ") "\n\n" \ | 492 comment = ["## " strrep(head,"\n","\n## ") "\n\n" ... |
493 "## -*- texinfo -*- \n## @deftypefn {Function File} " \ | 493 "## -*- texinfo -*- \n## @deftypefn {Function File} " ... |
494 "{@var{retval} =} " name " (@var{x} @var{y})\n##\n" \ | 494 "{@var{retval} =} " name " (@var{x} @var{y})\n##\n" ... |
495 "## @seealso{}\n## @end deftypefn\n\n" \ | 495 "## @seealso{}\n## @end deftypefn\n\n" ... |
496 "## " strrep(tail, "\n", "\n## ") "\n\n"]; | 496 "## " strrep(tail, "\n", "\n## ") "\n\n"]; |
497 endif | 497 endif |
498 text = [comment, body]; | 498 text = [comment, body]; |
499 endswitch | 499 endswitch |
500 | 500 |