mirror of
https://github.com/kanaka/mal.git
synced 2024-11-11 00:52:44 +03:00
guile: enable readline
This commit is contained in:
parent
728ee8fe5e
commit
c3b5dda753
@ -16,16 +16,16 @@
|
||||
;;(use-modules (ice-9 readline))
|
||||
|
||||
(library (readline)
|
||||
(export readline)
|
||||
(import (guile)))
|
||||
(export readline add-history)
|
||||
(import (guile) (ice-9 readline)))
|
||||
|
||||
(define mal-history
|
||||
(format #f "~a/.mal-history" (getenv "HOME")))
|
||||
|
||||
(setenv "GUILE_HISTORY" mal-history)
|
||||
|
||||
;;(activate-readline)
|
||||
(activate-readline)
|
||||
|
||||
(define (readline prompt)
|
||||
(display prompt)
|
||||
((@ (ice-9 rdelim) read-line) (current-input-port)))
|
||||
;;(define (readline prompt)
|
||||
;; (display prompt)
|
||||
;; ((@ (ice-9 rdelim) read-line) (current-input-port)))
|
||||
|
@ -160,7 +160,7 @@
|
||||
|
||||
(define (PRINT exp)
|
||||
(and (not (eof-object? exp))
|
||||
;;(add-history str)
|
||||
(add-history (object->string exp))
|
||||
(format #t "~a~%" (pr_str exp #t))))
|
||||
|
||||
(define (LOOP continue?)
|
||||
|
Loading…
Reference in New Issue
Block a user