> But yes, maybe an m4_divert_discard(diversion) would be nice shorthand for
> that.  Which brings up another weird semantic point of m4: m4_undivert
> honors the current diversion, even during argument collection.  So my
> current patch for m4_divert_text vs. m4_expand isn't quite right:
> 
> m4_expand([m4_divert_text([KILL], [m4_undivert(diversion)])])
> 
> should kill the text currently in diversion, but with the current state of
> the patch, it routes it to the current diversion rather than KILL.

Yes, it's things like this (especially the
diversion-during-argument-collection wart) that make me wonder if it
*could* ever work at all.

The expand-twice trick in my previous email seems worth pursuing...

Paolo


Reply via email to