mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-30 06:50:31 +02:00
fix to meta-reader's optional port argument
* module/system/repl/repl.scm (meta-reader): Make the generated read procedure accept a port argument.
This commit is contained in:
parent
ccbbbe6d70
commit
36fb1e06c8
1 changed files with 7 additions and 4 deletions
|
@ -32,10 +32,13 @@
|
||||||
(define meta-command-token (cons 'meta 'command))
|
(define meta-command-token (cons 'meta 'command))
|
||||||
|
|
||||||
(define (meta-reader read)
|
(define (meta-reader read)
|
||||||
|
(lambda read-args
|
||||||
|
(with-input-from-port
|
||||||
|
(if (pair? read-args) (car read-args) (current-input-port))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(if (eqv? (next-char #t) #\,)
|
(if (eqv? (next-char #t) #\,)
|
||||||
(begin (read-char) meta-command-token)
|
(begin (read-char) meta-command-token)
|
||||||
(read))))
|
(read))))))
|
||||||
|
|
||||||
;; repl-reader is a function defined in boot-9.scm, and is replaced by
|
;; repl-reader is a function defined in boot-9.scm, and is replaced by
|
||||||
;; something else if readline has been activated. much of this hoopla is
|
;; something else if readline has been activated. much of this hoopla is
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue