Skip to content

Commit 3377414

Browse files
committed
Merge pull request #106 from AeroNotix/gh-alf-optionally-silence-quickload
Add SILENT keyword to QUICKLOAD.
2 parents b679f3d + 3496363 commit 3377414

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

quicklisp/client.lisp

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,27 @@
1717
:initarg :system
1818
:reader not-quickloadable-system)))
1919

20-
(defgeneric quickload (systems &key verbose prompt explain &allow-other-keys)
20+
(defun maybe-silence (silent stream)
21+
(or (and silent (make-broadcast-stream)) stream))
22+
23+
(defgeneric quickload (systems &key verbose silent prompt explain &allow-other-keys)
2124
(:documentation
2225
"Load SYSTEMS the quicklisp way. SYSTEMS is a designator for a list
2326
of things to be loaded.")
2427
(:method (systems &key
2528
(prompt *quickload-prompt*)
29+
(silent nil)
2630
(verbose *quickload-verbose*) &allow-other-keys)
27-
(unless (consp systems)
28-
(setf systems (list systems)))
29-
(dolist (thing systems systems)
30-
(flet ((ql ()
31-
(autoload-system-and-dependencies thing :prompt prompt)))
32-
(if verbose
33-
(ql)
34-
(call-with-quiet-compilation #'ql))))))
31+
(let ((*standard-output* (maybe-silence silent *standard-output*))
32+
(*trace-output* (maybe-silence silent *trace-output*)))
33+
(unless (consp systems)
34+
(setf systems (list systems)))
35+
(dolist (thing systems systems)
36+
(flet ((ql ()
37+
(autoload-system-and-dependencies thing :prompt prompt)))
38+
(if verbose
39+
(ql)
40+
(call-with-quiet-compilation #'ql)))))))
3541

3642
(defmethod quickload :around (systems &key verbose prompt explain
3743
&allow-other-keys)

0 commit comments

Comments
 (0)