Skip to content
Snippets Groups Projects
Commit b1709146 authored by wlott's avatar wlott
Browse files

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.
parent e129c99e
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (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 @@ ...@@ -831,10 +831,10 @@
(unless (or (not found) (eq found package)) (unless (or (not found) (eq found package))
(error "A package named ~S already exists." name)) (error "A package named ~S already exists." name))
(remhash (package-%name package) *package-names*) (remhash (package-%name package) *package-names*)
(setf (package-%name package) name)
(setf (gethash name *package-names*) package)
(dolist (n (package-%nicknames package)) (dolist (n (package-%nicknames package))
(remhash n *package-names*)) (remhash n *package-names*))
(setf (package-%name package) name)
(setf (gethash name *package-names*) package)
(setf (package-%nicknames package) ()) (setf (package-%nicknames package) ())
(enter-new-nicknames package nicknames) (enter-new-nicknames package nicknames)
package)) package))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment