[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: new flag? wml -U

On Thu, Aug 16, 2001 at 04:18:44PM +0200, Jan Holler wrote:
> I suggest to implement a flag -U to undefine previously with
> -D defined variables.
> Reason:
> There is no way to unset such a variable as it is
> possible within a file with <set-var> ... <unset-var foo>
> e.g. if in an upper .wmlrc is -D BAR="foo" (since we need it 
> there) and in a lower (cd into some subdir) .wmlrc we would
> not want 'BAR' to be set, we cannot use such a construct
> because 'BAR' is set und 'newbar' will never be $(WML_SRC_BASENAME):
> <if <var-exists BAR>
> <set-var newbar=<get-var bar>>           # or $(BAR) instead of <get-var bar>
> <set-var newbar=$(WML_SRC_BASENAME)>
> >

Hi Jan,

I implemented this feature months ago, but never committed it. The
problem is that wml has then to distinguish between
  -D foo=bar -U foo
  -U foo -D foo=bar
which is not trivial.
IMO it is always possible to unset a variable by making it empty,
and replace your test by <if <get-var BAR> ...

Denis Barbier
WML Maintainer
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com