diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm index 906144442..6ce3b1f1c 100644 --- a/ice-9/boot-9.scm +++ b/ice-9/boot-9.scm @@ -2936,7 +2936,9 @@ (lambda () (set-readline-prompt! "") (set-readline-read-hook! #f))))))) - (scm-style-repl)) + (let ((status (scm-style-repl))) + (run-hooks exit-hook) + status)) ;; call at exit. (lambda () @@ -2954,6 +2956,10 @@ `(catch #t (lambda () ,expr) (lambda args #f))) +;;; This hook is run at the very end of an interactive session. +;;; +(define exit-hook '()) + ;;; Load readline code into root module if readline primitives are available. ;;; ;;; Ideally, we wouldn't do this until we were sure we were actually