[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: m4 -e
Gary V . Vaughan
Re: m4 -e
Thu, 9 Aug 2001 19:41:20 +0100
On Thursday 09 August 2001 11:09 am, Akim Demaille wrote:
> It seems to me that 1.4 used not to -e by default when ISATTY (stdin),
> while 1.4p does.
It didn't? Bah.
> AFAIC this is a bit of a pain, since when toying with M4 there are
> often problems such as infloop happening. Now I have to use kill to
> break m4 out of its loop.
> So I would propose:
> 1. reestablish the 1.4 behavior.
On the surface that sounds like the best idea, but then why wouldn't we we
want interactive mode on by default when interacting with the interpreter.
> 2. keep it as is but add a negative -e option
I think this is better...
> 3. when interactive, break the current expansion, but return to the
> main loop? No idea if this is actually feasible.
That would be cool! It is certainly possible with a longjmp, set to return
back to the main loop if an interrupt is detected. There might be a cleaner
way to do it by unwinding the call stack though.
> Also, how about making it possible to use readline? This could make
> 3. easier (when not linked with m4, simply exit?).
I would like to do this... but only as a module. M4 is rarely used
interactively (compared to the number of people who generate configure
scripts), so I don;t think readline belongs in the core. There is probably a
small amount of work needed in the main loop to provide the hooks for a
readline interface module to connect to.
> Also, I like when options are changeable by the script itself, so
> maybe we could have a builtin to adjust this? Something a la
To toggle interactive mode programmatically? Sure, why not.
())_. Gary V. Vaughan gary@(oranda.demon.co.uk|gnu.org)
( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____
/ )= GNU Hacker http://www.gnu.org/software/libtool \' `&
`(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/
- m4 -e, Akim Demaille, 2001/08/09
- Re: m4 -e,
Gary V . Vaughan <=