asdf:defsystem class bug

David Lichteblau <[email protected]>
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
Hi,

I tried to submit this asdf patch to the SourceForge bug tracking
system, but nothing happened...

ASDF:DEFSYSTEM removes :CLASS from its options (if present), but not the
keyword _argument_.

--- orig/asdf.lisp	Sat Jun  1 21:47:29 2002
+++ src/asdf.lisp	Wed Jun 19 18:05:26 2002
@@ -612,12 +612,14 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; syntax
 
+(defun remove-keyword (key arglist)
+  (loop for sublist = arglist then rest until (null sublist)
+	for (elt arg . rest) = sublist
+	unless (eq key elt) append (list elt arg)))
+
 (defmacro defsystem (name &body options)
   (destructuring-bind (&key pathname (class 'system) &allow-other-keys) options
-    (let ((component-options
-	   (if (member :class options)
-	       (remove :class options)
-	       options)))
+    (let ((component-options (remove-keyword :class options)))
       `(progn
 	;; system must be registered before we parse the body, otherwise
 	;; we recur when trying to find an existing system of the same name

David

----------------------------------------------------------------------------
                   Bringing you mounds of caffeinated joy
                   >>>     http://thinkgeek.com/sf    <<<
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.