[slime-cvs] CVS update: slime/swank.lisp

Helmut Eller heller at common-lisp.net
Tue Apr 20 22:32:08 UTC 2004


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv18128

Modified Files:
	swank.lisp 
Log Message:
(list-all-package-names): Optionally include nicknames in the
result (From Edi Weitz).
	
Date: Tue Apr 20 18:32:07 2004
Author: heller

Index: slime/swank.lisp
diff -u slime/swank.lisp:1.167 slime/swank.lisp:1.168
--- slime/swank.lisp:1.167	Wed Apr 14 14:50:25 2004
+++ slime/swank.lisp	Tue Apr 20 18:32:05 2004
@@ -351,7 +351,7 @@
 (defvar *thread-counter* 0)
 
 (defun remove-dead-threads ()
-  (setq *active-threads* 
+  (setq *active-threads*
         (remove-if-not #'thread-alive-p *active-threads*)))
 
 (defun add-thread (thread)
@@ -1730,8 +1730,12 @@
 
 ;;;;
 
-(defslimefun list-all-package-names ()
-  (mapcar #'package-name (list-all-packages)))
+(defslimefun list-all-package-names (&optional include-nicknames)
+  "Return a list of all package names.
+Include the nicknames if INCLUDE-NICKNAMES is true."
+  (loop for package in (list-all-packages)
+        collect (package-name package)
+        when include-nicknames append (package-nicknames package)))
 
 ;; Use eval for the sake of portability... 
 (defun tracedp (fspec)





More information about the slime-cvs mailing list