Re: Macro + diversion issue

2007-05-31 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Daniel Richard G. on 5/21/2007 1:43 AM: > In fact, it's a fairly simple patch. See attached for my stab at it. (Also, > there's a more straightforward test input file.) I did the two-arg > divert(), since that seems more natural than com

Re: Macro + diversion issue

2007-05-21 Thread Daniel Richard G.
On Mon, 2007 May 21 21:45:43 -0600, Eric Blake wrote: > > I'm debating if some other solution might also be helpful, such as a > builtin that adds an extra set of quotes only if it is called while > currently parsing the arguments to a macro. And it is also worth > considering the proposal for a

Re: Macro + diversion issue

2007-05-21 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Daniel Richard G. on 5/21/2007 1:43 AM: > In fact, it's a fairly simple patch. See attached for my stab at it. (Also, > there's a more straightforward test input file.) I did the two-arg > divert(), since that seems more natural than com

Re: Macro + diversion issue

2007-05-21 Thread Daniel Richard G.
In fact, it's a fairly simple patch. See attached for my stab at it. (Also, there's a more straightforward test input file.) I did the two-arg divert(), since that seems more natural than coming up with a new/separate builtin for this. I think this fills a hole in the core m4 feature set---righ

Re: Macro + diversion issue

2007-05-19 Thread Daniel Richard G.
On Sat, 2007 May 19 21:21:31 -0600, Eric Blake wrote: > > When m4 gets to the point marked by ^, it notices a macro, and expands it > to text as it continues to collect the arguments of foo, resulting in: > [...] > that is, you both swapped to and back from diversion 10, all while > collecting the

Re: Macro + diversion issue

2007-05-19 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Daniel Richard G. on 5/19/2007 7:00 PM: > Hello, > > I've been messing around with diversions inside macros, and have come upon > an odd scenario. I'd like to call it a bug, but I get the same behavior > from m4 1.4 as from 1.9a. Not a

Macro + diversion issue

2007-05-19 Thread Daniel Richard G.
Hello, I've been messing around with diversions inside macros, and have come upon an odd scenario. I'd like to call it a bug, but I get the same behavior from m4 1.4 as from 1.9a. See the attached m4 input file. You have div10(), a macro which sends its argument to diversion 10, and foo(), a t