From 064dc5920ae70b0a9e25cb6cb3eb633aa01160ce Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Sat, 16 May 1992 01:08:22 +0000
Subject: [PATCH] Changed DEFPACKAGE to warn if there are any packages that are
 no longer in the :USE lists.

Changed IN-PACKAGE to not wrap an eval-when around %IN-PACKAGE, because the
compiler needs to handle it in magic ways.
---
 code/package.lisp | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/code/package.lisp b/code/package.lisp
index 7b5fcc581..921a20c06 100644
--- a/code/package.lisp
+++ b/code/package.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/package.lisp,v 1.22 1992/05/15 21:51:52 wlott Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/package.lisp,v 1.23 1992/05/16 01:08:22 wlott Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -686,10 +686,10 @@
     (unless (eq use :default)
       (let ((old-use-list (package-use-list package))
 	    (new-use-list (mapcar #'package-or-lose use)))
-	(dolist (other-package (set-difference new-use-list old-use-list))
-	  (use-package other-package package))
-	(dolist (other-package (set-difference old-use-list new-use-list))
-	  (unuse-package other-package package))))
+	(use-package (set-difference new-use-list old-use-list) package)
+	(let ((laterize (set-difference old-use-list new-use-list)))
+	  (unuse-package other-package package)
+	  (warn "~A used to use the following packages:~%  ~S" laterize))))
     ;; Import and Intern.
     (dolist (sym-name interns)
       (intern sym-name package))
@@ -807,8 +807,7 @@
 	 (warn "Old-style IN-PACKAGE.")
 	 `(old-in-package ,package ,@noise))
 	(t
-	 `(eval-when (compile load eval)
-	    (%in-package ',(stringify-name package "package"))))))
+	 `(%in-package ',(stringify-name package "package")))))
 ;;;
 (defun %in-package (name)
   (setf *package* (package-or-lose name)))
-- 
GitLab