On Monday 28 February 2011, Peter Rosin wrote: > Den 2011-02-21 21:23 skrev Ralf Wildenhues: > > * Stefano Lattarini wrote on Mon, Feb 21, 2011 at 03:11:27PM CET: > >> On Monday 21 February 2011, Ralf Wildenhues wrote: > >>> It will be unintelligible without the comments, however. > > > >>> gnulib-tool has a sed comment removal, search for > >>> $sed_comments. What I wouldn't like is invoking an extra sed in each > >>> test startup just to remove comments from a helper function, that will > >>> noticeably slow down things > >>> > >> Or the comments could be stripped lazily upon the first invocation of > >> 'unindent'; e.g.: > > > > Good idea. > > How about this? > > Should the sed command to strip comments be "s/ *#.*//", > IMHO yes, but I have no strong feelings here -- I'm ok also with the "weaker" 's/ #.*//'.
> or does that fall into this bucket: > > Unicos 9 sed loops endlessly on patterns like ‘.*\n.*’. > I dont see why; there's not `\n' nor repated `.*' in the regex ` *#.*'. > Cheers, > Peter > Your new implementation keeps the test `self-check-unindent.test' satisfied, so feel free to push it (either with or without the amendment to the 's/ #*.//' expression). Thanks, Stefano