From 1c7433275b33e54ce023b06a9304ec71f81c6954 Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Tue, 20 Nov 1990 19:08:45 +0000
Subject: [PATCH] Changed COMPILE-FILE to set *COMPILER-ERROR-OUTPUT* to
 *ERROR-OUTPUT* before it closes the output file, so that any compiler error
 stuff during the load of a :LOAD T compile will go somewhere, rather than
 gagging on a closed stream

---
 compiler/main.lisp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/compiler/main.lisp b/compiler/main.lisp
index 72f842852..a5d619dd3 100644
--- a/compiler/main.lisp
+++ b/compiler/main.lisp
@@ -1323,6 +1323,10 @@
 
       (when error-file-stream
 	(let ((name (pathname error-file-stream)))
+	  ;;
+	  ;; Leave this var pointing to something reasonable in case someone
+	  ;; tries to use it before the LET ends, e.g. during the LOAD.
+	  (setq *compiler-error-output* *error-output*)
 	  (close error-file-stream)
 	  (when (and compile-won (not error-severity))
 	    (delete-file name))))
-- 
GitLab