Simplify diversion stack handling.
commit9f4363abb6ea4803dd85e9fa55f569b6e641b8c8
authorEric Blake <ebb9@byu.net>
Thu, 30 Oct 2008 21:32:56 +0000 (30 15:32 -0600)
committerEric Blake <ebb9@byu.net>
Fri, 31 Oct 2008 16:25:24 +0000 (31 10:25 -0600)
tree793bd9fc3362652581fedfe9ee9493239f697644
parent852082f1196b29d8a5759f1efa490accb4a8ba6b
Simplify diversion stack handling.

* lib/m4sugar/m4sugar.m4 (m4_divert_stack): Use fewer macros, and
avoid extra newlines.
(m4_divert_stack_push): Compute location here, rather than caller.
(m4_divert_push): Update caller.
(m4_divert): Likewise, and also adjust current diversion name.
(m4_divert_pop): Simplify rule that diversion stack must never go
empty.
(_m4_require_call): Bypass diversion stack when collecting
required macro text.
(m4_init): Set current diversion without requiring m4_init.
* lib/m4sugar/m4sh.m4 (AS_INIT): Avoid too many pops.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Schedule wrapped
text to run prior to m4sugar cleanup.
* doc/autoconf.texi (Text processing Macros) <m4_newline>: Mention
optional argument.
(Conditional constructs) <m4_ifvaln, m4_n>: Mention use of dnl.
* NEWS: Undo blurb about m4_divert.
* tests/m4sugar.at (m4@&t@_divert_stack): New test.

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