X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/0630988acc7864483d8f6ed96f0ff1971ddb4db6..4e7092a3248d55e4af0b45c38a67e3a7998b59a7:/dot/lisp-init.lisp diff --git a/dot/lisp-init.lisp b/dot/lisp-init.lisp index da50a6f..8b0e3f9 100644 --- a/dot/lisp-init.lisp +++ b/dot/lisp-init.lisp @@ -13,6 +13,24 @@ (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")