From 90f30d519309192f7459377e791a4a3df7a11c2e Mon Sep 17 00:00:00 2001
From: emarsden <emarsden>
Date: Mon, 2 Jun 2003 16:00:03 +0000
Subject: [PATCH] Progress towards finer-grained package locks:

   - LOAD binds *ENABLE-PACKAGE-LOCKED-ERRORS*, so loading a file that
     sets that variable only has an effect while loading

   - the WITHOUT-PACKAGE-LOCKS needs an EVAL-WHEN (noted by Lynn Quamm
     on cmucl-imp)
---
 code/load.lisp    | 5 +++--
 code/package.lisp | 7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/code/load.lisp b/code/load.lisp
index 562399169..9c9f183ca 100644
--- a/code/load.lisp
+++ b/code/load.lisp
@@ -5,11 +5,11 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/load.lisp,v 1.85 2002/11/12 02:05:32 toy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/load.lisp,v 1.86 2003/06/02 16:00:03 emarsden Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
-;;; Loader for Spice Lisp.
+;;; Loader for CMUCL.
 ;;; Written by Skef Wholey and Rob MacLachlan.
 ;;;
 (in-package "LISP")
@@ -533,6 +533,7 @@
     (progv (vars) (vals)
       (let ((*package* *package*)
 	    (*readtable* *readtable*)
+            (*enable-package-locked-errors* *enable-package-locked-errors*)
 	    (*load-depth* (1+ *load-depth*)))
 	(values 
 	 (with-simple-restart (continue "Return NIL from load of ~S." filename)
diff --git a/code/package.lisp b/code/package.lisp
index b364794ef..fbb45fee9 100644
--- a/code/package.lisp
+++ b/code/package.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/package.lisp,v 1.66 2003/05/12 16:30:41 emarsden Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/package.lisp,v 1.67 2003/06/02 16:00:03 emarsden Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -163,8 +163,9 @@
 
 
 (defmacro without-package-locks (&body body)
-  `(let ((*enable-package-locked-errors* nil))
-      ,@body))
+  `(eval-when (:compile-toplevel :load-toplevel :execute)
+    (let ((*enable-package-locked-errors* nil))
+      ,@body)))
 
 
 ;; trap attempts to redefine a function in a locked package, and
-- 
GitLab