Index: swank-clisp.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-clisp.lisp,v
retrieving revision 1.34
diff -u -r1.34 swank-clisp.lisp
--- swank-clisp.lisp	28 Aug 2004 02:27:08 -0000	1.34
+++ swank-clisp.lisp	14 Sep 2004 18:16:46 -0000
@@ -32,6 +32,98 @@
   (when (find-package "LINUX")
     (pushnew :linux *features*)))
 
+(defun import-to-swank-mop (sym/sym-list)
+  (if (listp sym/sym-list)      
+      (dolist (sym sym/sym-list)
+	(import-to-swank-mop sym))
+      (let* ((sym sym/sym-list)
+	     (swank-mop-sym (find-symbol (symbol-name sym) :swank-mop)))
+	;; 1) "delete" the symbol form the :swank-mop package
+	(when swank-mop-sym
+	  (unintern swank-mop-sym :swank-mop))
+	(import sym :swank-mop)
+	(export sym :swank-mop))))
+
+(import-to-swank-mop
+ '(;; classes
+   cl:standard-generic-function
+   clos::standard-slot-definition
+   cl:method
+   cl:standard-class
+   ;; standard-class readers
+   clos::class-default-initargs
+   clos::class-direct-default-initargs
+   clos::class-direct-slots
+   clos::class-direct-subclasses
+   clos::class-direct-superclasses
+   clos:class-finalized-p
+   cl:class-name
+   clos::class-precedence-list
+   clos::class-prototype
+   clos::class-slots
+   ;; generic function readers
+   ;; DIFFERENT NAMES - implemented delegating methods below
+;     clos:generic-function-argument-precedence-order
+;     clos:generic-function-declarations
+;     clos:generic-function-lambda-list
+;     clos:generic-function-methods
+;     clos:generic-function-method-class
+;     clos:generic-function-method-combination
+;     clos:generic-function-name
+   ;; method readers
+;     clos::method-generic-function
+;     clos::method-function
+;     clos::method-lambda-list
+;     clos::method-specializers
+;     clos::method-qualifiers
+   ;; slot readers
+;   clos::slot-definition-allocation
+;   clos::slot-definition-initargs
+;   clos::slot-definition-initform
+;   clos::slot-definition-initfunction
+;   clos::slot-definition-name
+;   clos::slot-definition-type
+;   clos::slot-definition-readers
+;   clos::slot-definition-writers
+   ))
+
+(defun swank-mop:slot-definition-documentation (slot)
+  (clos::documentation slot t))
+
+(defmacro define-delegations (arglist &body from/to-pairs)
+  "Create simple wrappers for the specified functions. The pairs are from of the
+form:  (WRAPPER-NAME ACTUAL-FUNCTION). ARGLIST is the will be used as each
+function's arglist"
+  `(progn
+    ,@(mapcar (lambda (pair) `(defun ,(first pair) ,arglist (,(second pair) ,@arglist))))))
+
+(define-delegations (gf)
+  (swank-mop:generic-function-argument-precedence-order clos::gf-argument-precedence-order)
+  (swank-mop:generic-function-declarations clos::gf-declarations)
+  (swank-mop:generic-function-lambda-list clos::gf-lambda-list)
+  (swank-mop:generic-function-methods clos::gf-methods)
+  (swank-mop:generic-function-method-class clos::gf-method-class)
+  (swank-mop:generic-function-method-combination clos::gf-method-combination)
+  (swank-mop:generic-function-name clos::gf-name))
+
+(define-delegations (method)
+  (swank-mop:method-generic-function clos::std-method-gf)
+  (swank-mop:method-function clos::std-method-function)
+  (swank-mop:method-lambda-list clos::std-method-lambda-list)
+  (swank-mop:method-specializers clos::std-method-specializers)
+  (swank-mop:method-qualifiers clos::std-method-qualifiers))
+
+(define-delegations (slot-def)
+   (swank-mop:slot-definition-allocation clos::slotdef-allocation)
+   (swank-mop:slot-definition-initargs clos::slotdef-initargs)
+   (swank-mop:slot-definition-initform clos::slotdef-initform)
+   (swank-mop:slot-definition-initfunction clos::slotdef-initfunction)
+   (swank-mop:slot-definition-name clos::slotdef-name)
+   (swank-mop:slot-definition-type clos::slotdef-type)
+   (swank-mop:slot-definition-readers clos::slotdef-readers)
+   (swank-mop:slot-definition-writers clos::slotdef-writers))
+
+
 #+linux
 (defmacro with-blocked-signals ((&rest signals) &body body)
   (ext:with-gensyms ("SIGPROCMASK