From b1709146c942c7676f9a32b9bcc6b1f8a6ca6602 Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Wed, 13 Mar 1991 00:21:54 +0000 Subject: [PATCH] When renaming a package, don't add the new name until *after* the nicknames have been removed. Otherwise, if you rename a package to be one of it's nicknames, then the entry for that package will be lost when the nickname entry is removed. --- code/package.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/package.lisp b/code/package.lisp index 281f18804..9c8c940f1 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.10 1991/02/11 13:24:43 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/package.lisp,v 1.11 1991/03/13 00:21:54 wlott Exp $") ;;; ;;; ********************************************************************** ;;; @@ -831,10 +831,10 @@ (unless (or (not found) (eq found package)) (error "A package named ~S already exists." name)) (remhash (package-%name package) *package-names*) - (setf (package-%name package) name) - (setf (gethash name *package-names*) package) (dolist (n (package-%nicknames package)) (remhash n *package-names*)) + (setf (package-%name package) name) + (setf (gethash name *package-names*) package) (setf (package-%nicknames package) ()) (enter-new-nicknames package nicknames) package)) -- GitLab