Paolo Bonzini <bonzini <at> gnu.org> writes:

> 
> I'm not sure tracking the location is not useful.  As a first step, you
> can use m4_define if the common version is empty and m4_defun otherwise.

I don't see why the common would ever usefully be empty (just use m4_defun_once 
or m4_expand_once instead, if you have initialization but no body).

Ah.  m4_fatal uses m4_expansion_stack_dump, which does indeed have less 
information if location is not being tracked.  Perhaps we could change the 
common definition from its current:

$2

to the more complex:

m4_expansion_stack_push(_m4_defn(
 [m4_location($1)])[: $1 is expanded from...])$2[]m4_expansion_stack_pop()

while still trimming out the diversion manipulation in _m4_defun_{epi,pro}, so 
that we are still lighter weight than a full blown m4_defun on the common code.

-- 
Eric Blake





Reply via email to