[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AS_SET_UNEXPANDED_ARGS proposal
From: |
Stepan Kasal |
Subject: |
Re: AS_SET_UNEXPANDED_ARGS proposal |
Date: |
Thu, 25 Aug 2005 11:18:31 +0200 |
User-agent: |
Mutt/1.4.1i |
Hello,
On Wed, Aug 24, 2005 at 12:26:54PM -0700, Paul Eggert wrote:
> > 2005-08-24 Stepan Kasal <address@hidden>
> > * 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
- Re: A simplification of _AC_CANONICAL_SPLIT, (continued)
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/18
- Re: A simplification of _AC_CANONICAL_SPLIT, Paul Eggert, 2005/08/18
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/19
- Re: A simplification of _AC_CANONICAL_SPLIT, Paul Eggert, 2005/08/19
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/22
- Re: A simplification of _AC_CANONICAL_SPLIT, Paul Eggert, 2005/08/22
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/23
- Re: A simplification of _AC_CANONICAL_SPLIT, Paul Eggert, 2005/08/23
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/24
- AS_SET_UNEXPANDED_ARGS proposal, Paul Eggert, 2005/08/24
- Re: AS_SET_UNEXPANDED_ARGS proposal,
Stepan Kasal <=
- Re: AS_SET_UNEXPANDED_ARGS proposal, Paul Eggert, 2005/08/25