[Top][All Lists]

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

Re: m4 -e

From: Gary V . Vaughan
Subject: Re: m4 -e
Date: Thu, 9 Aug 2001 19:41:20 +0100

On Thursday 09 August 2001 11:09 am, Akim Demaille wrote:
> hi!

Salut Akim!

> 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
> debugmode/debugfile.

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__/

reply via email to

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