This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Reading more than one expression on the same line


I sent this patch in April, but didn't get any response.  So here it
is again...

When readline is *not* activated, this is what you see if you type two
expressions on the same line and press enter:

guile> 'a 'b
a
guile> b
guile> 

Whereas I think it would be more natural, and less confusing, to see:

guile> 'a 'b
a
b
guile> 

If the consensus agrees with me, the fix is to modify repl-reader in
boot-9.scm so that it only displays its prompt when there is no input
already available, as in the following patch.

Regards,

     Neil


2000-04-09  Neil Jerram  <neil@ossau.uklinux.net>

	* boot-9.scm (repl-reader): Only display prompt if there isn't
	input already available.

Index: boot-9.scm
===================================================================
RCS file: /cvs/guile/guile/guile-core/ice-9/boot-9.scm,v
retrieving revision 1.200
diff -c -r1.200 boot-9.scm
*** boot-9.scm	2000/03/02 20:44:19	1.200
--- boot-9.scm	2000/04/09 22:00:54
***************
*** 2460,2467 ****
  ;;; the readline library.
  (define repl-reader
    (lambda (prompt)
!     (display prompt)
!     (force-output)
      (run-hook before-read-hook)
      (read (current-input-port))))
  
--- 2460,2469 ----
  ;;; the readline library.
  (define repl-reader
    (lambda (prompt)
!     (if (not (char-ready?))
!         (begin
!           (display prompt)
!           (force-output)))
      (run-hook before-read-hook)
      (read (current-input-port))))
  



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]