[movitz-cvs] CVS update: movitz/losp/muerte/packages.lisp
Frode Vatvedt Fjeld
ffjeld at common-lisp.net
Sun May 29 22:03:07 UTC 2005
Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv12173
Modified Files:
packages.lisp
Log Message:
*** empty log message ***
Date: Mon May 30 00:03:06 2005
Author: ffjeld
Index: movitz/losp/muerte/packages.lisp
diff -u movitz/losp/muerte/packages.lisp:1.9 movitz/losp/muerte/packages.lisp:1.10
--- movitz/losp/muerte/packages.lisp:1.9 Thu May 5 15:21:50 2005
+++ movitz/losp/muerte/packages.lisp Mon May 30 00:03:06 2005
@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef at acm.org>
;;;; Created at: Thu Aug 30 15:19:43 2001
;;;;
-;;;; $Id: packages.lisp,v 1.9 2005/05/05 13:21:50 ffjeld Exp $
+;;;; $Id: packages.lisp,v 1.10 2005/05/29 22:03:06 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -39,9 +39,11 @@
(package-object-use-list (find-package package-name)))
(defun find-package (name)
- (if (packagep name)
- name
- (find-package-string (string name))))
+ (typecase name
+ (package name)
+ (null (find-package 'common-lisp)) ; This can be practical..
+ ((or symbol string) (find-package-string (string name)))
+ (t (error "Not a package name: ~S" name))))
(defun find-package-string (name &optional (start 0) (end (length name)) (key 'identity))
(values (gethash-string name start end *packages* nil key)))
More information about the Movitz-cvs
mailing list