mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +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-reader read)
|
||||
(lambda ()
|
||||
(if (eqv? (next-char #t) #\,)
|
||||
(begin (read-char) meta-command-token)
|
||||
(read))))
|
||||
(lambda read-args
|
||||
(with-input-from-port
|
||||
(if (pair? read-args) (car read-args) (current-input-port))
|
||||
(lambda ()
|
||||
(if (eqv? (next-char #t) #\,)
|
||||
(begin (read-char) meta-command-token)
|
||||
(read))))))
|
||||
|
||||
;; 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue