[movitz-cvs] CVS update: movitz/losp/muerte/basic-macros.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Thu May 20 17:43:47 UTC 2004


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv31939

Modified Files:
	basic-macros.lisp 
Log Message:
Make defpackage :use list translate the common-lisp package to the
muerte.common-lisp package, so as to better support movitz-compiling
the same code as normal.

Date: Thu May 20 13:43:47 2004
Author: ffjeld

Index: movitz/losp/muerte/basic-macros.lisp
diff -u movitz/losp/muerte/basic-macros.lisp:1.17 movitz/losp/muerte/basic-macros.lisp:1.18
--- movitz/losp/muerte/basic-macros.lisp:1.17	Mon Apr 19 11:06:26 2004
+++ movitz/losp/muerte/basic-macros.lisp	Thu May 20 13:43:46 2004
@@ -9,7 +9,7 @@
 ;;;; Created at:    Wed Nov  8 18:44:57 2000
 ;;;; Distribution:  See the accompanying file COPYING.
 ;;;;                
-;;;; $Id: basic-macros.lisp,v 1.17 2004/04/19 15:06:26 ffjeld Exp $
+;;;; $Id: basic-macros.lisp,v 1.18 2004/05/20 17:43:46 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -65,12 +65,19 @@
 (defmacro defpackage (package-name &rest options)
   (pushnew '(:use) options :key #'car)
   (let ((uses (cdr (assoc :use options))))
+    (setf uses (mapcar (lambda (use)
+			 (if (member use '(:cl :common-lisp) :test #'string=)
+			     :muerte.cl
+			   use))
+		       uses))
     (when (or (null uses)
 	      (member :muerte.cl uses :test #'string=)
 	      (member :muerte.common-lisp uses :test #'string=))
-      (push '(:shadowing-import-from :common-lisp nil) options)))
-  `(eval-when (:compile-toplevel)
-     (defpackage ,package-name , at options)))
+      (push '(:shadowing-import-from :common-lisp nil) options))
+    (let ((movitz-options (cons (cons :use uses)
+				(remove :use options :key #'car))))
+      `(eval-when (:compile-toplevel)
+	 (defpackage ,package-name , at movitz-options)))))
 
 (defmacro cond (&rest clauses)
   (if (null clauses)





More information about the Movitz-cvs mailing list