1
1
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:
Nala Ginrut 2015-04-04 04:09:31 +08:00
parent 728ee8fe5e
commit c3b5dda753
2 changed files with 7 additions and 7 deletions

View File

@ -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)))

View File

@ -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?)