X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-package.lisp;h=7efbdff7931db4ed3563a6737234b31bbda320f9;hb=bb3994fcc9a556d1a26d35f6ff9386d01030821d;hp=0e0a0aa5bb67f01d6e2d460918ba8704ec37140b;hpb=46b1591074b5cf7611eeab0d1e4af7ee4e22ec94;p=sbcl.git diff --git a/src/code/target-package.lisp b/src/code/target-package.lisp index 0e0a0aa..7efbdff 100644 --- a/src/code/target-package.lisp +++ b/src/code/target-package.lisp @@ -640,9 +640,10 @@ implementation it is ~S." *default-package-use-list*) (defun rename-package (package-designator name &optional (nicknames ())) #!+sb-doc "Changes the name and nicknames for a package." + (let ((package nil)) (tagbody :restart - (let* ((package (find-undeleted-package-or-lose package-designator)) - (name (package-namify name)) + (setq package (find-undeleted-package-or-lose package-designator)) + (let* ((name (package-namify name)) (found (find-package name)) (nicks (mapcar #'string nicknames))) (unless (or (not found) (eq found package)) @@ -668,8 +669,8 @@ implementation it is ~S." *default-package-use-list*) (setf (package-%name package) name (gethash name names) package (package-%nicknames package) ())) - (%enter-new-nicknames package nicknames)) - package))) + (%enter-new-nicknames package nicknames)))) + package)) (defun delete-package (package-designator) #!+sb-doc @@ -966,8 +967,8 @@ uninterned." (remove symbol shadowing-symbols))) (multiple-value-bind (s w) (find-symbol name package) - (declare (ignore s)) - (cond ((or (eq w :internal) (eq w :external)) + (cond ((not (eq symbol s)) nil) + ((or (eq w :internal) (eq w :external)) (nuke-symbol (if (eq w :internal) (package-internal-symbols package) (package-external-symbols package))