* m4sugar.m4 (m4_expand_once): Accept a witness.

This commit is contained in:
Akim Demaille 2001-01-24 07:47:12 +00:00
parent bddc739371
commit 6989c24425
3 changed files with 16 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2001-01-24 Akim Demaille <akim@epita.fr>
* m4sugar.m4 (m4_expand_once): Accept a witness.
2001-01-23 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_EXPAND_ONCE): Remove, use m4_expand_once.

View File

@ -1279,13 +1279,14 @@ m4_expansion_stack_pop()dnl
])
# m4_expand_once(TEXT)
# --------------------
# If TEXT has never been expanded, expand it *here*.
# m4_expand_once(TEXT, [WITNESS = TEXT])
# --------------------------------------
# If TEXT has never been expanded, expand it *here*. Use WITNESS as
# as a memory that TEXT has already been expanded.
m4_define([m4_expand_once],
[m4_provide_ifelse([$1],
[m4_provide_ifelse(m4_ifval([$2], [[$2]], [[$1]]),
[],
[m4_provide([$1])[]$1])])
[m4_provide(m4_ifval([$2], [[$2]], [[$1]]))[]$1])])
# m4_provide(MACRO-NAME)

View File

@ -1279,13 +1279,14 @@ m4_expansion_stack_pop()dnl
])
# m4_expand_once(TEXT)
# --------------------
# If TEXT has never been expanded, expand it *here*.
# m4_expand_once(TEXT, [WITNESS = TEXT])
# --------------------------------------
# If TEXT has never been expanded, expand it *here*. Use WITNESS as
# as a memory that TEXT has already been expanded.
m4_define([m4_expand_once],
[m4_provide_ifelse([$1],
[m4_provide_ifelse(m4_ifval([$2], [[$2]], [[$1]]),
[],
[m4_provide([$1])[]$1])])
[m4_provide(m4_ifval([$2], [[$2]], [[$1]]))[]$1])])
# m4_provide(MACRO-NAME)