diff --git a/quicklisp/client.lisp b/quicklisp/client.lisp index cef8df8..16f28ef 100644 --- a/quicklisp/client.lisp +++ b/quicklisp/client.lisp @@ -17,21 +17,27 @@ :initarg :system :reader not-quickloadable-system))) -(defgeneric quickload (systems &key verbose prompt explain &allow-other-keys) +(defun maybe-silence (silent stream) + (or (and silent (make-broadcast-stream)) stream)) + +(defgeneric quickload (systems &key verbose silent prompt explain &allow-other-keys) (:documentation "Load SYSTEMS the quicklisp way. SYSTEMS is a designator for a list of things to be loaded.") (:method (systems &key (prompt *quickload-prompt*) + (silent nil) (verbose *quickload-verbose*) &allow-other-keys) - (unless (consp systems) - (setf systems (list systems))) - (dolist (thing systems systems) - (flet ((ql () - (autoload-system-and-dependencies thing :prompt prompt))) - (if verbose - (ql) - (call-with-quiet-compilation #'ql)))))) + (let ((*standard-output* (maybe-silence silent *standard-output*)) + (*trace-output* (maybe-silence silent *trace-output*))) + (unless (consp systems) + (setf systems (list systems))) + (dolist (thing systems systems) + (flet ((ql () + (autoload-system-and-dependencies thing :prompt prompt))) + (if verbose + (ql) + (call-with-quiet-compilation #'ql))))))) (defmethod quickload :around (systems &key verbose prompt explain &allow-other-keys)