dot/lisp-init.lisp, dot/shell-rc: Suppress Lisp heralds; use `rlwrap'.
[profile] / dot / lisp-init.lisp
index da50a6f..8b0e3f9 100644 (file)
 (setf ext:*gc-verbose* nil
       ext:*require-verbose* nil)
 
+#+ecl
+(let ((old-output *standard-output*)
+      (old-prompt si:*tpl-prompt-hook*))
+  ;; There doesn't seem to be a good way to do this, so we do it the bad
+  ;; way.  Since the herald is printed to `*standard-outout*', we set (not
+  ;; bind!) that to a bit bucket, and then arrange to restore it just before
+  ;; the first REPL prompt is written.
+  ;;
+  ;; One more awful part is that, having intercepted the prompt hook, I need
+  ;; to restore and invoke the old version, and there isn't a clean way to do
+  ;; this.
+  (when (<= (ext:argc) 1)
+    (setf *standard-output* (make-broadcast-stream)
+         si:*tpl-prompt-hook* (lambda ()
+                                (setf *standard-output* old-output
+                                      si:*tpl-prompt-hook* old-prompt)
+                                (si::tpl-prompt)))))
+
 ;; Obtain ASDF from somewhere.
 (require "asdf")