Reordering of clauses in defmetaclass.
Thu Aug 23 02:40:46 PDT 2007 Ryszard Szopa <ryszard.szopa@gmail.com>
* Reordering of clauses in defmetaclass.
diff -rN -u old-mop-utils/mop-utils.lisp new-mop-utils/mop-utils.lisp
--- old-mop-utils/mop-utils.lisp 2014-04-17 11:50:48.000000000 -0700
+++ new-mop-utils/mop-utils.lisp 2014-04-17 11:50:49.000000000 -0700
@@ -34,7 +34,11 @@
(let ((superclasses (cdr (assoc :validate-superclasses body)))
(slot-fixtures (cdr (assoc :slot-fixtures body))))
`(progn
-
+ (defclass ,class-name ,supers
+ ,slot-definitions
+
+ ,@(remove-if (lambda (sexp) (or (equal :validate-superclasses (car sexp))
+ (equal :slot-fixtures (car sexp)))) body))
,@(when slot-fixtures
(let ((dir-slot-name (intern (format nil "~A-DIRECT-SLOT-DEFINITION" class-name)))
(eff-slot-name (intern (format nil "~A-EFFECTIVE-SLOT-DEFINITION" class-name))))
@@ -58,11 +62,7 @@
:collect `(defmethod validate-superclass ((class ,class-name)
(superclass ,super))
t)))
- (defclass ,class-name ,supers
- ,slot-definitions
-
- ,@(remove-if (lambda (sexp) (or (equal :validate-superclasses (car sexp))
- (equal :slot-fixtures (car sexp)))) body)))))
+ (find-class ',class-name))))
(defun class-name-of (object)
"The class-name of the class of OBJECT."