From: Paul K. <pki...@ja...> - 2002-11-03 14:42:05
|
I'm a heavy user of cvs diff -c *.m - Paul On Sun, Nov 03, 2002 at 11:57:15AM +0000, Etienne Grossmann wrote: > > Hello, > > the intent was to facilitate the transition and make clear what was > changed and what is new. If bugs appear, one can check that the new > and old code really do the same. I was tagging lots of code by hand > and I found the macro useful. > > Cheers, > > Etienne > > On Sat, Nov 02, 2002 at 05:53:22PM -0500, Paul Kienzle wrote: > # Supporting both styles of args will lead to a lot crufty code. Along with > # the rapid developments of the past few months (cell array support and > # keyed list support) we are going to be doing a lot of things differently. > # > # Do we really want to support pre-2.1.38 Octave? > # > # I've already converted functions in general, image and signal, but I can > # put backward compatibility support in again if someone wants to take the > # time to write the preprocessor. > # > # Please use apps available to configure: cc, grep, awk, sed but no perl, > # python or tcl. > # > # To support the TSA toolbox, the preprocessor should also be able to test > # for matlab versions. > # > # How about: > # > # %function foo (...) %# pre o2.1.37 > # function foo (varargin) %# post o2.1.37 or post m5.0.0 > # %function foo (a1,a2,a3,a4,a5) %# pre m5 > # > # Or if you don't want to bother with Matlab 4 support > # > # %function foo (...) %# pre o2.1.37 > # function foo (varargin) %# post o2.1.37 or post m0 > # > # We don't have to write the preprocessor now, but it would be nice to > # nail the syntax. > # > # Call it with > # mprep o$OCTAVE_VERSION *.m > # or > # mprep m$MATLAB_VERSION *.m > # > # > # So version is nameMajor.Minor.Patch, and we need pre, post, and, or > # > # We could let name be the null string for octave. > # > # Thoughts? > # > # - Paul > # > # On Sat, Nov 02, 2002 at 01:35:29PM +0000, Etienne Grossmann wrote: > # > > # > Hello, > # > > # > for those who use emacs and are updating octave code for 2.1.39, the > # > following macro may come handy to substitute a line like > # > > # > function foo (...) > # > > # > into > # > > # > ## pre 2.1.39 function foo (...) > # > function foo (...) ## pos 2.1.39 > # > > # > , so that it be easy to keep track of the changes. > # > > # > Hth, > # > > # > Etienne > # > > # > ====================================================================== > # > ;; Keyboard Macro Editor. Press C-c C-c to finish; press C-x k RET to cancel. > # > ;; Original keys: C-a C-k C-y C-a ## S-SPC pre SPC 2.1.39 SPC C-e RET C-y C-e SPC ## SPC pos SPC 2.1.39 > # > > # > Command: octadapt > # > Key: none > # > > # > Macro: > # > > # > C-a ;; beginning-of-line > # > C-k ;; kill-line > # > C-y ;; hilit-yank > # > C-a ;; beginning-of-line > # > ## ;; self-insert-command * 2 > # > S-SPC > # > pre ;; self-insert-command * 3 > # > SPC ;; self-insert-command > # > 2.1.39 ;; self-insert-command * 6 > # > SPC ;; self-insert-command > # > C-e ;; end-of-line > # > RET ;; newline > # > C-y ;; hilit-yank > # > C-e ;; end-of-line > # > SPC ;; self-insert-command > # > ## ;; self-insert-command * 2 > # > SPC ;; self-insert-command > # > pos ;; self-insert-command * 3 > # > SPC ;; self-insert-command > # > 2.1.39 ;; self-insert-command * 6 > # > > # > > # > -- > # > Etienne Grossmann ------ http://www.isr.ist.utl.pt/~etienne > # > > # > > # > ------------------------------------------------------- > # > This sf.net email is sponsored by: See the NEW Palm > # > Tungsten T handheld. Power & Color in a compact size! > # > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > # > _______________________________________________ > # > Octave-dev mailing list > # > Oct...@li... > # > https://lists.sourceforge.net/lists/listinfo/octave-dev > # > # > > -- > Etienne Grossmann ------ http://www.isr.ist.utl.pt/~etienne |