[snipped totally correct reasoning]
So, for potential efficiency purposes, should we rewrite this line to use:
as_lineno_stack=$as_lineno_stack=as_lineno_stack
Actually as_lineno_stack=${as_lineno_stack}as_lineno_stack=
or maybe even write AS_APPEND([var],[text]), which expands to a shell
Paolo Bonzini bonzini at gnu.org writes:
2008-10-14 Paolo Bonzini bonzini at gnu.org
* lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG): If defined, use $as_lineno as
the line number emitted to the log file.
(AS_LINENO_PUSH, AS_LINENO_POP): New.
Now that this is already applied...
Ok, so here is what I concocted to get correct line numbers in shell
functions. The idea is that the line number of the outermost invocation
wins.
In C-like syntax, that would be just
if (++depth == 1)
as_lineno=SOMETHING
...
if (--depth == 0)
unset as_lineno
but we have to find
Paolo Bonzini bonzini at gnu.org writes:
2008-10-14 Paolo Bonzini bonzini at gnu.org
* lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG): If defined, use $as_lineno as
the line number emitted to the log file.
(AS_LINENO_PUSH, AS_LINENO_POP): New.
* tests/m4sh.at (LINENO Stack):