[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: m4_defun_init
From: |
Eric Blake |
Subject: |
Re: m4_defun_init |
Date: |
Fri, 24 Oct 2008 17:32:55 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
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