[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: [BUG REPORT] WML 1.6.8, debian linux
- From: Denis Barbier <nospam@thanx>
- Date: Tue, 9 Mar 1999 12:37:39 +0100 (CET)
On Mon, 8 Mar 1999, Ralf S. Engelschall wrote:
> On Mon, Mar 08, 1999, stiegele@informatik.uni-freiburg.de wrote:
>
> > Package: WML 1.6.8
> > Operating System: debian linux
> >
> > Problem Description:
> > | hallo,
> > |
> > | in phase 4 deines wml-packetes scheint sich ein
> > | kleiner bug eingeschlichen zu haben. folgende eingabe
> > | fuehrt naemlich bei mir dazu, dass sich der computer
> > | ne ganze weile mit phase 4 beschaeftigt, bevor er meint,
> > | dass sein speicher jetzt alle sei.
[Snip]
Thanks for the report Patrick.
I am not sure whether it is a bug or a feature. For instance, what about
<symbol donald "mickey">
<symbol mickey "minnie">
Should `donald' expand to `mickey' or `minnie'? I prefer the former.
One solution is to define <symbol> this way:
<define-tag symbol>
m4_changequote()\
<ifeq <get-var %1> undef
<prog m4_undefine(`%0')>
<prog m4_define(`%0', `m4_quotes()`%1'm4_noquotes()')>>
m4_changequote(, )\
</define-tag>
But this will not work, you also need to modify lines 695-696 of wml:
print TMP "m4_define(`m4_noquotes', `m4_changequote(, )')m4_dnl\n";
print TMP "m4_define(`m4_quotes', `m4_changequote`'')m4_dnl\n";
In the next release, these lines will be removed from wml and put
elsewhere, maybe in .../include/sys/boot.wml.
In fact i don't like m4 quoting because we french people write a lot of
single quotes, and i always have to use non-standard quotes.
Maybe the definitions below could stand in tags.wml, any opinion?
# Custom opening and closing quotes.
<set-var m4-leftquote="[:[">
<set-var m4-rightquote="]:]">
<define-tag m4-expr-quote>
<get-var m4-leftquote>%body<get-var m4-rightquote>
</define-tag>
# Invoke m4 in a local environment where quotes are changed
<define-container m4-quotes>
m4_changequote(,)m4_changequote(<m4-expr-quote ,>)\
%body\
m4_changequote(,)\
</define-container>
<define-tag symbol>
<m4-quotes>\
<ifeq <get-var %1> undef
<prog m4_undefine(<m4-expr-quote %0>)>
<prog m4_define(<m4-expr-quote %0>,\
<m4-expr-quote <prog <m4-quotes><m4-expr-quote %1></m4-quotes>>>)>
>
</m4-quotes>
</define-tag>
Denis
--
D. Barbier
http://imacs.polytechnique.fr
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com