From b8654321e9bb003da77dbf9eabd8d69cba7e6b29 Mon Sep 17 00:00:00 2001
From: Raymond Toy <toy.raymond@gmail.com>
Date: Mon, 31 Aug 2015 20:51:55 -0700
Subject: [PATCH] Really don't print the herald when -quiet is given.

The previous implementation cleared *herald-items* when -quiet was
given, but if the init file loaded up items that added to
*herald-items*, then the items were still printed.  Plus, it seems odd
that -quiet actually clears *herald-items*.

So, just don't print herald if -quiet is given, but also preserve
*herald-items* so that (print-herald) would actually print the actual
herald.
---
 src/code/save.lisp | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/code/save.lisp b/src/code/save.lisp
index f06461f53..747ba99b7 100644
--- a/src/code/save.lisp
+++ b/src/code/save.lisp
@@ -254,8 +254,7 @@
                        *compile-print* nil
                        *compile-progress* nil
                        *require-verbose* nil
-                       *gc-verbose* nil
-                       *herald-items* nil))
+                       *gc-verbose* nil))
 	       (when (and process-command-line
 			  (or (find-switch "help")
 			      (find-switch "-help")))
@@ -280,12 +279,15 @@
 			     :if-does-not-exist nil)
 		       (or (load "home:init" :if-does-not-exist nil)
 			   (load "home:.cmucl-init"
-				 :if-does-not-exist nil))))))
-	     (when process-command-line
-	       (ext::invoke-switch-demons *command-line-switches*
-					  *command-switch-demons*))
-	     (when print-herald
-	       (print-herald))))
+				 :if-does-not-exist nil)))))
+	       (when process-command-line
+		 (ext::invoke-switch-demons *command-line-switches*
+					    *command-switch-demons*))
+	       (when (and print-herald
+			  (not (and process-command-line
+				    (find-switch "quiet"))))
+		 ;; Don't print the herald if -quiet is given.
+		 (print-herald)))))
 	 (funcall init-function))
        (restart-lisp ()
 	 (unix:unix-exit
-- 
GitLab