view tools/foreach.m4 @ 1534:199ba528fd4a

Only insert a link to a component to a key frame. - To check if it is a key frame, now, before inserting a link to a component. - When it is not in a key frame, it is supposed to be a "dup" group. We should not make a link there.
author Thinker K.F. Li <thinker@codemud.net>
date Fri, 30 Sep 2011 14:17:35 +0800
parents f4b792afa74e
children
line wrap: on
line source

divert([-1])

define([_arg1], [$1])

define([_foreach], [ifelse([$2], [()], [],
[define([$1], _arg1$2)$3[]_foreach([$1], (shift$2), [$3])])])

define([foreach], [pushdef([$1])_foreach($@)popdef([$1])])

divert[]dnl