Hi Eric, * Eric Blake wrote on Sat, Oct 13, 2007 at 07:35:59PM CEST: > > Another improvement borrowed from libtool. m4_join was mistakenly > m4_defun'd instead of m4_define'd. Additionally, it is nice to avoid > back-to-back separators for an empty argument. A quick search didn't turn > up any clients of m4_join that expected back-to-back separators (since > most clients provided non-empty arguments in every position, rather than > taking libtool's approach of m4_join'ing a list of macro expansions, some > of which might be empty). And it doesn't hurt that this new > implementation is slightly faster, or that m4_join was previously > undocumented (hmm, it looks like I already snuck in the NEWS for this > change in an earlier patch).
Thanks for your work on this. I had some year-old notes on m4_join that I'll try to dig out, but for now I only have this question for your implementation: is it possible to pass a comma as either argument (separator, entries) to the current version of m4_join? Is it possible to pass a macro that is defined to expand to comma? This doesn't seem to work right: m4_define([x],[,]) m4_define([y],[,]) m4_join([x],[y],[z]) Thanks, Ralf > 2007-10-13 Eric Blake <[EMAIL PROTECTED]> > > Change m4_join to match libtool's ltsugar semantics. > * lib/m4sugar/m4sugar.m4 (m4_join): Just define this, not defun. > Ignore empty arguments, using... > (_m4_join): ...this new helper. > * tests/m4sugar.at (m4@&[EMAIL PROTECTED]): New test. > * doc/autoconf.texi (Text processing Macros): Document new > semantics of m4_join.
