Skip to content
Snippets Groups Projects
Commit 7a760664 authored by ram's avatar ram
Browse files

Fixed people to not destructively modify the USE, USED-BY and

SHADOWING-SYMBOLS lists so that they don't get retroactively modified when
we hand them off to the user.
Also, in SHADOW, when symbols is NIL, shadow no symbols, not NIL.
parent 04b7c046
No related branches found
No related tags found
No related merge requests found
...@@ -970,7 +970,7 @@ ...@@ -970,7 +970,7 @@
(shadowing-import sym package) (shadowing-import sym package)
(return-from unintern t))))))) (return-from unintern t)))))))
(setf (package-%shadowing-symbols package) (setf (package-%shadowing-symbols package)
(delete symbol shadowing-symbols))) (remove symbol shadowing-symbols)))
(multiple-value-bind (s w) (find-symbol name package) (multiple-value-bind (s w) (find-symbol name package)
(declare (ignore s)) (declare (ignore s))
...@@ -1162,7 +1162,7 @@ ...@@ -1162,7 +1162,7 @@
;; ;;
;; If it was shadowed, we don't want Unintern to flame out... ;; If it was shadowed, we don't want Unintern to flame out...
(setf (package-%shadowing-symbols package) (setf (package-%shadowing-symbols package)
(delete s (the list (package-%shadowing-symbols package)))) (remove s (the list (package-%shadowing-symbols package))))
(unintern s package)) (unintern s package))
(add-symbol internal sym)) (add-symbol internal sym))
(pushnew sym (package-%shadowing-symbols package))))) (pushnew sym (package-%shadowing-symbols package)))))
...@@ -1181,7 +1181,7 @@ ...@@ -1181,7 +1181,7 @@
(let* ((package (package-or-lose package)) (let* ((package (package-or-lose package))
(internal (package-internal-symbols package))) (internal (package-internal-symbols package)))
(dolist (name (mapcar #'string (dolist (name (mapcar #'string
(if (consp symbols) symbols (list symbols)))) (if (listp symbols) symbols (list symbols))))
(multiple-value-bind (s w) (find-symbol name package) (multiple-value-bind (s w) (find-symbol name package)
(when (or (not w) (eq w :inherited)) (when (or (not w) (eq w :inherited))
(setq s (make-symbol name)) (setq s (make-symbol name))
...@@ -1264,12 +1264,12 @@ ...@@ -1264,12 +1264,12 @@
(let ((package (package-or-lose package))) (let ((package (package-or-lose package)))
(dolist (p (package-listify packages-to-unuse)) (dolist (p (package-listify packages-to-unuse))
(setf (package-%use-list package) (setf (package-%use-list package)
(delete p (the list (package-%use-list package)))) (remove p (the list (package-%use-list package))))
(setf (package-tables package) (setf (package-tables package)
(delete (package-external-symbols p) (delete (package-external-symbols p)
(the list (package-tables package)))) (the list (package-tables package))))
(setf (package-%used-by-list p) (setf (package-%used-by-list p)
(delete package (the list (package-%used-by-list p))))) (remove package (the list (package-%used-by-list p)))))
t)) t))
;;; Find-All-Symbols -- Public ;;; Find-All-Symbols -- Public
......
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