[Top][All Lists]

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

Re: defn() with multiple arguments

From: Eric Blake
Subject: Re: defn() with multiple arguments
Date: Thu, 09 Aug 2007 06:10:41 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070728 Thunderbird/ Mnenhy/

Hash: SHA1

According to Schwarz, Konrad on 8/9/2007 1:08 AM:
> On another tack, the otherwise excellent m4 manual is silent on what
> happens if you change the quoting characters to open parenthesis, close
> parenthesis.  I would expect things to break, since these characters
> enclose a macro's arguments; perhaps it would be worthwhile to add a
> warning to the manual not to do this, or to prohibit it outright, or
> perhaps to clarify the resulting situation.  (Similar, but more
> theoretical, questions arise for use of comma, dollar, and number sign
> as quoting characters.)

In CVS head (currently labeled m4 1.9a), we have added the changesyntax
builtin, which lets you change which characters play the role normally
used by ( and ).  And in 1.4.10, the manual already mentions the
following, in the changequote node, exactly addressing your concern:

| Quotes are recognized in preference to argument collection.  In
| particular, if `start' is a single `(', then argument
| collection is effectively disabled.  For portability with other
| implementations, it is a good idea to avoid `(', `,', and
| `)' as the first character in `start'.

In my opinion, having changequote force a prohibition of certain tokens
would only be an artificial limitation of the source code, so I don't see
any reason to change the current behavior, even if it does mean the user
can shoot themselves in the foot.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

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