Hello,
On Wed, Aug 24, 2005 at 12:26:54PM -0700, Paul Eggert wrote:
> > 2005-08-24 Stepan Kasal <[EMAIL PROTECTED]>
> > * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Simplify; rejecting
> > some evil values and relying on the fact that $* concatenates the
> > parameters by the first character from IFS.
>
> That looks good; please install.
done.
Regarding this:
> if (set -f) 2>/dev/null; then
> ac_do_noglob='set -f'
> ac_do_glob='set +f'
> else
> ac_do_noglob=
> ac_do_glob=
> fi
>
> ac_save_IFS=$IFS
> IFS='-'
> $ac_do_noglob
> set x $something; shift
> $ac_do_glob
> IFS=$ac_save_IFS
>
> This should be done almost everywhere that there is a 'set' command
> with args. Perhaps m4sh needs an AS_SET_UNEXPANDED_ARGS macro, or
It sounds good. But I think AS_SET_ARGS is a better name.
Moreover, I see no point in that "push" of IFS.
(If we encounter a situation where one such push is inside another one,
they would probably both use ac_save_IFS anyway...)
I think that m4sh should define as_default_IFS. Then we could do
# AS_SET_ARGS(ARGS, [IFS-VALUE])
# ------------------------------
# Calls `set' to set args, temporarily disabling pathname expansion
# (if the shell supports it). If IFS-VALUE is given, IFS is temporarily
# changed to it.
#
m4_define([AS_SET_ARGS],
[m4_ifval([$2], [IFS='$2'; ])dnl
$ac_do_noglob; set x $something; shift; $ac_do_glob[]dnl
m4_ifval([$2], [; IFS=$as_default_IFS])[]dnl
])
Would you agree with this?
Have a nice day,
Stepan Kasal