[Top][All Lists]

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

Re: Proposed change to `make-readline-port'

From: Neil Jerram
Subject: Re: Proposed change to `make-readline-port'
Date: 07 Mar 2001 22:56:10 +0000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.5

>>>>> "Dirk" == Dirk Herrmann <address@hidden> writes:

    Dirk> A little improvement: If you replace the line (set!
    Dirk> (buffered-input-continuation? port) #t)

    Dirk> by

    Dirk>   (if (not (char-whitespace? res)) (set!
    Dirk> (buffered-input-continuation? port) #t))

    Dirk> then the following will work: Enter a space on after the
    Dirk> prompt and type return.  In the previous version and in your
    Dirk> current one the prompt will change to '...', after applying
    Dirk> the above change it won't.

Done - thanks.

    Dirk> However, the implementation of buffered-input has a lot of
    Dirk> hard-coded knowledge to realize the 'continuation?' trick,
    Dirk> which makes it less generally useful than was originally
    Dirk> intended.  Thus I wonder if it is really a good change after
    Dirk> all...

I think it is still a good change, because:

(i) it is no more complex that it was when part of (ice-9 readline);
the continuation? thing is just a more abstract rewriting of the line
in `make-readline-port' that used to say `(set! prompt prompt2)'

(ii) it provides a common procedure for which I have a genuine need;
otherwise I would have to duplicate a lot of the code that used to be
in `make-readline-port'.


reply via email to

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