Hi,

Michael Matz <[EMAIL PROTECTED]> writes:
[snip]
> diff -urp autoconf-2.52/m4sugar.m4 autoconf-2.52-matz/m4sugar.m4
> --- autoconf-2.52/m4sugar.m4  Wed Jul 18 13:11:14 2001
> +++ autoconf-2.52-matz/m4sugar.m4     Tue Nov 13 02:58:01 2001
> @@ -671,11 +671,12 @@ m4_define([m4_foreach],
>  [m4_pushdef([$1])_m4_foreach($@)m4_popdef([$1])])
>
>  # Low level macros used to define m4_foreach.
> -m4_define([m4_car], [$1])
> +m4_define([m4_car], [[$1]])
> +m4_define([m4_car2], [[$@]])

Can you use a more descriptive name for 'car2'.  'car' has the LISPish
notion of being the first of a list.  'car2' above doesn't have any
such notion.  One name could be 'm4_force' to force a safe expansion
(and it has a nice correspondence to its LISP/Scheme counterpart
delay/force).

>  m4_define([_m4_foreach],
>  [m4_if(m4_quote($2), [], [],
>         [m4_define([$1], [m4_car($2)])$3[]_m4_foreach([$1],
> -                                                     [m4_shift($2)],
> +                                             m4_car2(m4_shift($2)),
>                                                       [$3])])])

- Hari
-- 
Raja R Harinath ------------------------------ [EMAIL PROTECTED]
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash

Reply via email to