Fix m4_map regression from 2007-10-16.
commitaeff96ce94c6ef4ea28fb77cf3c121e0db35cf09
authorEric Blake <ebb9@byu.net>
Fri, 15 Aug 2008 13:06:39 +0000 (15 07:06 -0600)
committerEric Blake <ebb9@byu.net>
Fri, 15 Aug 2008 13:06:39 +0000 (15 07:06 -0600)
tree17c085158b2cc931ecea102b85fcd8cb12400458
parent903b58ef950b8bd5598c45909744309f58c03c45
Fix m4_map regression from 2007-10-16.

* lib/m4sugar/m4sugar.m4 (_m4_apply): New macro.
(m4_map): Ignore empty sublists.  For a list consisting of only an
empty sublist, this restores 2.61 behavior of being a no-op.
(m4_map_sep): Likewise, and expand separator.
(m4_mapall, m4_mapall_sep): New macros, to regain 2.62 behavior.
(_m4_map): Rewrite, to be common base for all four variants.
* lib/m4sugar/foreach.m4 (_m4_map): Adjust to new prototype.
* tests/m4sugar.at (m4@&t@_map): Add tests.
* doc/autoconf.texi (Looping constructs) <m4_map>: Document new
macros, and mention ramifications of expanded separator.
* NEWS: Mention the change.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
NEWS
doc/autoconf.texi
lib/m4sugar/foreach.m4
lib/m4sugar/m4sugar.m4
tests/m4sugar.at