anchor.diff:                      :local-nicknames ',local-nicknames))))
   
   (defun rename-package (package new-name &optional new-nicknames)
  -  (setf package (find-package-or-die package))
  -  (when (packagep new-name) (error "Not sure what to do when NEW-NAME is a package?"))
  -  (setf new-name (string new-name))
  -  (setf new-nicknames (mapcar 'string new-nicknames))
  -  (let ((new-names (remove-duplicates (cons new-name new-nicknames)))
  -        (old-names (cons (package-name package) (package-nicknames package))))
  -    (dolist (name new-names)
  -      (when (and (find-package name)
  -                 (not (eql (find-package name) package)))
  -        (error "New name ~S for package ~S conflicts with existing package ~S.~%"
  -               name package (find-package name))))
  -    ;; Remove the old names.
  -    (setf *package-list* (remove-if (lambda (name)
  -                                      (member name old-names :test 'string=))
  -                                    *package-list*
  -                                    :key 'car))
  -    ;; Add the new names.
  -    (dolist (name new-names)
  -      (push (cons name package) *package-list*))
  -    ;; Rename the package
  -    (setf (package-%name package) new-name
  -          (package-%nicknames package) new-nicknames))
  -  package)
  +  (with-package-system-lock ()
  +    (setf package (find-package-or-die package))
  +    (when (packagep new-name)
  +      (error "Not sure what to do when NEW-NAME is a package?"))
  +    (setf new-name (string new-name))
  +    (setf new-nicknames (mapcar 'string new-nicknames))
  +    (let ((new-names (remove-duplicates (cons new-name new-nicknames)))
  +          (old-names (cons (package-name package) (package-nicknames package))))
  +      (dolist (name new-names)
  +        (when (and (find-package name)
  +                   (not (eql (find-package name) package)))
  +          (error "New name ~S for package ~S conflicts with existing package ~S.~%"
  +                 name package (find-package name))))
  +      ;; Remove the old names.
  +      (setf *package-list* (remove-if (lambda (name)
  +                                        (member name old-names :test 'string=))
  +                                      *package-list*
  +                                      :key 'car))
  +      ;; Add the new names.
  +      (dolist (name new-names)
  +        (push (cons name package) *package-list*))
  +      ;; Rename the package
  +      (setf (package-%name package) new-name
  +            (package-%nicknames package) new-nicknames))
  +    package))
   
   (defun shadow-one-symbol (symbol-name package)
  +  (check-package-system-lock-held)
     (multiple-value-bind (symbol presentp)
         (gethash symbol-name (package-%internal-symbols package))
       (declare (ignore symbol))
  
positive.code:              :expected-type 'package-designator)))
  
  (defun use-one-package (package-to-use package)
    (when (eql package-to-use *keyword-package*)
      (error 'simple-package-error
             :package package
  
negative.code:       (setf (symbol-package symbol) package))))
  
  (defun import (symbols &optional (package *package*))
    (with-package-system-lock ()
      (let ((p (find-package-or-die package)))
        (if (listp symbols)
            (dolist (s symbols)
              (import-one-symbol s p))
            (import-one-symbol symbols p))))
    t)
  
  (defun export-one-symbol (symbol package)
    (check-package-system-lock-held)
    (dolist (q (package-used-by-list package))
      (multiple-value-bind (other-symbol status)
          (find-symbol (symbol-name symbol) q)
  