mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
repl-reader accepts optional "read" argument
* module/ice-9/boot-9.scm (repl-reader): Accept an optional second argument, the reader to use. If it is given, use it instead of dereferencing the current-reader fluid. * guile-readline/ice-9/readline.scm (activate-readline): Make our replacement definition of repl-reader compatible with boot-9.
This commit is contained in:
parent
27c8177fe4
commit
a58b7fbb7e
2 changed files with 10 additions and 5 deletions
|
@ -2705,11 +2705,14 @@ module '(ice-9 q) '(make-q q-length))}."
|
|||
;;; The default repl-reader function. We may override this if we've
|
||||
;;; the readline library.
|
||||
(define repl-reader
|
||||
(lambda (prompt)
|
||||
(lambda (prompt . reader)
|
||||
(display (if (string? prompt) prompt (prompt)))
|
||||
(force-output)
|
||||
(run-hook before-read-hook)
|
||||
((or (fluid-ref current-reader) read) (current-input-port))))
|
||||
((or (and (pair? reader) (car reader))
|
||||
(fluid-ref current-reader)
|
||||
read)
|
||||
(current-input-port))))
|
||||
|
||||
(define (scm-style-repl)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue