[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to patsubst the result of an include?

From: Gary V. Vaughan
Subject: Re: How to patsubst the result of an include?
Date: Fri, 04 Feb 2005 13:27:36 +0000
User-agent: Mozilla Thunderbird 0.9 (X11/20041103)

Hi Stepan,

Stepan Kasal wrote:
> +  + We need a way to ask for one level of expansion; this is somewhat
> +    similar, but not identical, to `defn'.  For example:
> +     expandonce(`macro(a, b, c)')
> +    would return the body of the macro, quoted, with parameters substituted;
> +     expandonce(`include(`file')')
> +    would return the contents of the file, in a quote pair.
> +    This would help with problems like
> +     http://lists.gnu.org/archive/html/m4-discuss/2005-02/msg00000.html
> +    and perhaps could also address this
> +     http://lists.gnu.org/archive/html/autoconf/2004-12/msg00095.html
> +     http://lists.gnu.org/archive/html/autoconf/2004-12/msg00094.html

Instead, for the next release I want to come up with a mechanism for allowing
macros to return their results quoted, though I haven't yet thought of a clean
way to turn it on and off, or how much control is needed over what macros will
be affected.  Once that has been implemented, include would be able to quote
its own expansion.  Your input is welcome!

Maybe there is some merit to expandonce too, but this isn't it :-)

> +  + m4 should keep an ``execution stack'' of macros, which could applications
> +    use in their error messages.


Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]