m4-discuss
[Top][All Lists]
Advanced

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

Re: Unstrippable quotes


From: Akim Demaille
Subject: Re: Unstrippable quotes
Date: Mon, 21 Jul 2003 10:13:41 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

 > Akim Demaille wrote:
 >> Hi gary,

 > Salut Akim!

 >> I would to hold the release of these macros, or to fix them asap: they
 >> ought to return their argument *quoted*.  Actually, most m4 macros are
 >> broken by design and should be duplicated with their quoting
 >> equivalent.
 >> For instance:
 >> ~/src/ace % cat /tmp/foo.m4
 >> nostromo 16:09
 >> define(`foo', `bar')
 >> patsubst(`Foo', `F', `f')
 >> ~/src/ace % m4 /tmp/foo.m4                                       nostromo 
 >> 16:09
 >> bar
 >> should display foo instead.  So I'd like to have epatsubst, eregexp
 >> etc. return a quoted result.

 > I agree that this is a very real problem with m4 as a language, but I
 > think Rene's solution of adding an extra syntax category for
 > unstrippable quotes is a better, more backward compatible solution.

Err, I can't see any reference to unstripable quotes on the list :(
Where is it?  I suppose it is the same as "hard quotes" in M5.  That's
definitely something we want, but I'm not sure to understand why the
addition of a workaround cures a problem.  The spec is broken, it
should be repaired!

Plus, hard quotes are probably not of much use in the context of an
application such as Autoconf, where the users will not accept a sudden
change of say `\'.

 > If you (or anyone here!) wants to work on that patch, I'd be happy to
 > help, and apply.  But I want to concentrate on fixing the exported API
 > for module writers and release 1.5 (actually, I'm thinking of calling
 > the next release 2.0) ASAP.

In that case, please, do remove the new patsubst etc.  They are
broken, they should be fixed now.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]