X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-aclrepl%2Ftoplevel.lisp;h=4b418d3609a530d32cb5d1c9526441f156726219;hb=837bd0de8dabfd4199e886397420a9d912681396;hp=b3f96f550904c333d0fb9d2653a2a5fd382e46ef;hpb=541c9393cf9d9b61271c5f087020d34547603a34;p=sbcl.git diff --git a/contrib/sb-aclrepl/toplevel.lisp b/contrib/sb-aclrepl/toplevel.lisp index b3f96f5..4b418d3 100644 --- a/contrib/sb-aclrepl/toplevel.lisp +++ b/contrib/sb-aclrepl/toplevel.lisp @@ -21,7 +21,11 @@ (let ((*noprint* noprint) (*break-level* break-level) (*inspect-break* inspect) - (*continuable-break* continuable)) + (*continuable-break* continuable) + (*dir-stack* nil) + (*history* nil) + (*cmd-number* 1) + (*package* *package*)) (sb-int:/show0 "entering REPL") (loop (multiple-value-bind (reason reason-param) @@ -55,10 +59,13 @@ (results (multiple-value-list (sb-impl::interactive-eval form)))) (unless *noprint* (dolist (result results) - ;; Don't fresh-line before a result, since newline was entered by user - ;; in *repl-read-form-fun* - (prin1 result) - (fresh-line))))) + ;; FIXME: Calling fresh-line before a result ensures the result starts + ;; on a newline, but it usually generates an empty line. + ;; One solution would be to have the newline's entered on the + ;; input stream inform the output stream that the column should be + ;; reset to the beginning of the line. + (fresh-line *standard-output*) + (prin1 result *standard-output*))))) (defun repl-fun (noprint) (repl :noprint noprint :break-level 0))