[slime-cvs] CVS slime

trittweiler trittweiler at common-lisp.net
Mon May 14 15:21:18 UTC 2007


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv29585

Modified Files:
	swank.lisp 
Log Message:
* swank.lisp (package-names): Make sure to return a fresh list.
  (fuzzy-find-matching-packages): Use PACKAGE-NAMES.
  (list-all-package-names): Use PACKAGE-NAMES.


--- /project/slime/cvsroot/slime/swank.lisp	2007/05/11 15:40:52	1.483
+++ /project/slime/cvsroot/slime/swank.lisp	2007/05/14 15:21:18	1.484
@@ -3920,11 +3920,7 @@
     (declare (type function converter))
     (if (and time-limit-p (<= time-limit 0))
         (values #() time-limit)
-        (loop with all-package-names = (mapcan #'(lambda (package)
-                                              (cons (package-name package)
-                                                    (copy-list (package-nicknames package))))
-                                          (list-all-packages)) 
-              for package-name in all-package-names 
+        (loop for package-name in (mapcan #'package-names (list-all-packages))
               for converted-name = (funcall converter package-name)
               for package-symbol = (or (find-symbol package-name)
                                         (make-symbol package-name)) ; no INTERN
@@ -4307,9 +4303,9 @@
   "Return a list of all package names.
 Include the nicknames if NICKNAMES is true."
   (mapcar #'unparse-name
-          (loop for package in (list-all-packages)
-                collect (package-name package)
-                when nicknames append (package-nicknames package))))
+          (if nicknames
+              (mapcan #'package-names (list-all-packages))
+              (mapcar #'package-name  (list-all-packages)))))
 
 
 ;;;; Tracing
@@ -5639,8 +5635,8 @@
     alist))
 
 (defun package-names (package)
-  "Return the name and all nicknames of PACKAGE in a list."
-  (cons (package-name package) (package-nicknames package)))
+  "Return the name and all nicknames of PACKAGE in a fresh list."
+  (cons (package-name package) (copy-list (package-nicknames package))))
 
 (defun cl-symbol-p (symbol)
   "Is SYMBOL a symbol in the COMMON-LISP package?"




More information about the slime-cvs mailing list