X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-package.lisp;h=20190239e2b94266c47cdd5bfb6cabf566023da8;hb=bfe145acc01eb7a43790173db4f08610ae9cb07a;hp=074e43d2a8d163ab18bb611271f1548c663c33d2;hpb=ff92598854bf7cae8d57fe49cef4d9a98e1ab345;p=sbcl.git diff --git a/src/code/target-package.lisp b/src/code/target-package.lisp index 074e43d..2019023 100644 --- a/src/code/target-package.lisp +++ b/src/code/target-package.lisp @@ -152,35 +152,35 @@ error if any of PACKAGES is not a valid package designator." (defun package-lock-violation (package &key (symbol nil symbol-p) format-control format-arguments) - (let ((restart :continue) - (cl-violation-p (eq package (find-package :common-lisp)))) - (flet ((error-arguments () - (append (list (if symbol-p - 'symbol-package-locked-error - 'package-locked-error) - :package package - :format-control format-control - :format-arguments format-arguments) - (when symbol-p (list :symbol symbol)) - (list :references - (append '((:sbcl :node "Package Locks")) - (when cl-violation-p - '((:ansi-cl :section (11 1 2 1 2))))))))) - (restart-case - (apply #'cerror "Ignore the package lock." (error-arguments)) - (:ignore-all () - :report "Ignore all package locks in the context of this operation." - (setf restart :ignore-all)) - (:unlock-package () - :report "Unlock the package." - (setf restart :unlock-package))) - (ecase restart - (:continue - (pushnew package *ignored-package-locks*)) - (:ignore-all - (setf *ignored-package-locks* t)) - (:unlock-package - (unlock-package package)))))) + (let* ((restart :continue) + (cl-violation-p (eq package *cl-package*)) + (error-arguments + (append (list (if symbol-p + 'symbol-package-locked-error + 'package-locked-error) + :package package + :format-control format-control + :format-arguments format-arguments) + (when symbol-p (list :symbol symbol)) + (list :references + (append '((:sbcl :node "Package Locks")) + (when cl-violation-p + '((:ansi-cl :section (11 1 2 1 2))))))))) + (restart-case + (apply #'cerror "Ignore the package lock." error-arguments) + (:ignore-all () + :report "Ignore all package locks in the context of this operation." + (setf restart :ignore-all)) + (:unlock-package () + :report "Unlock the package." + (setf restart :unlock-package))) + (ecase restart + (:continue + (pushnew package *ignored-package-locks*)) + (:ignore-all + (setf *ignored-package-locks* t)) + (:unlock-package + (unlock-package package))))) (defun package-lock-violation-p (package &optional (symbol nil symbolp)) ;; KLUDGE: (package-lock package) needs to be before