[slime-cvs] CVS update: slime/swank-clisp.lisp

Marco Baringer mbaringer at common-lisp.net
Thu Sep 16 16:38:02 UTC 2004


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv12438

Modified Files:
	swank-clisp.lisp 
Log Message:

Date: Thu Sep 16 18:38:02 2004
Author: mbaringer

Index: slime/swank-clisp.lisp
diff -u slime/swank-clisp.lisp:1.36 slime/swank-clisp.lisp:1.37
--- slime/swank-clisp.lisp:1.36	Thu Sep 16 17:58:27 2004
+++ slime/swank-clisp.lisp	Thu Sep 16 18:38:01 2004
@@ -38,60 +38,58 @@
 
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (defvar *have-mop*
-    (if (and (find-package :clos)
-             (eql :external
-                  (nth-value 1 (find-symbol (string ':standard-slot-definition) :clos))))
-        '(and)
-        '(or))))
-
-#+#.*have-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
-   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
-   ))
-
-#+#.*have-mop*
-(defun swank-mop:slot-definition-documentation (slot)
-  (clos::slot-definition-documentation slot))
+    (and (find-package :clos)
+         (eql :external
+              (nth-value 1 (find-symbol (string ':standard-slot-definition) :clos))))
+    "True in those CLISP imagse which have a complete MOP implementation."))
+
+#+#.(cl:if swank-backend::*have-mop* '(cl:and) '(cl:or))
+(progn
+  (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
+     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::slot-definition-documentation slot)))
 
-#-#.*have-mop*
+#-#.(cl:if swank-backend::*have-mop* '(and) '(or))
 (defclass swank-mop:standard-slot-definition ()
   ()
   (:documentation "Dummy class created so that swank.lisp will compile and load."))
@@ -512,41 +510,38 @@
                    collect `(:value ,value)
                    collect '(:newline))))))
 
-#-#.*have-mop*
-(defmethod inspect-for-emacs ((o standard-object) (inspector clisp-inspector))
+#-#.(cl:if swank-backend::*have-mop* '(cl:and) '(cl:or))
+(progn
+  (defmethod inspect-for-emacs ((o standard-object) (inspector clisp-inspector))
   (declare (ignore inspector))
   (values (format nil "An instance of the class" (class-of o))
           `("Sorry, inspecting of instances is not supported in this version of CLISP."
             (:newline)
             "Please upgrade to a recent version of CLISP.")))
 
-#-#.*have-mop*
-(defmethod inspect-for-emacs ((gf standard-generic-function) (inspector clisp-inspector))
-  (declare (ignore inspector))
-  (values "A generic function."
-          `("Sorry, inspecting of generic functions is not supported in this version of CLISP."
-            (:newline)
-            "Please upgrade to a recent version of CLISP.")))
-
-#-#.*have-mop*
-(defmethod inspect-for-emacs ((method standard-method) (inspector t))
-  (declare (ignore inspector))
-  (values "A standard method."
-          `("Sorry, inspecting of methods is not supported in this version of CLISP."
-            (:newline)
-            "Please upgrade to a recent version of CLISP.")))
-
-#-#.*have-mop*
-(defmethod inspect-for-emacs ((class standard-class) (inspector t))
-  (declare (ignore inspector))
-  (values "A class."
-          `("Sorry, inspecting of classes is not supported in this version of CLISP."
-            (:newline)
-            "Please upgrade to a recent version of CLISP.")))
+  (defmethod inspect-for-emacs ((gf standard-generic-function) (inspector clisp-inspector))
+    (declare (ignore inspector))
+    (values "A generic function."
+            `("Sorry, inspecting of generic functions is not supported in this version of CLISP."
+              (:newline)
+              "Please upgrade to a recent version of CLISP.")))
+
+  (defmethod inspect-for-emacs ((method standard-method) (inspector t))
+    (declare (ignore inspector))
+    (values "A standard method."
+            `("Sorry, inspecting of methods is not supported in this version of CLISP."
+              (:newline)
+              "Please upgrade to a recent version of CLISP.")))
+
+  (defmethod inspect-for-emacs ((class standard-class) (inspector t))
+    (declare (ignore inspector))
+    (values "A class."
+            `("Sorry, inspecting of classes is not supported in this version of CLISP."
+              (:newline)
+              "Please upgrade to a recent version of CLISP.")))
 
-#-#.*have-mop*
-(defmethod inspect-for-emacs ((slot swank-mop:standard-slot-definition) (inspector t))
-  (declare (ignore inspector)))
+  (defmethod inspect-for-emacs ((slot swank-mop:standard-slot-definition) (inspector t))
+    (declare (ignore inspector))))
 
 (defimplementation quit-lisp ()
   (#+lisp=cl ext:quit #-lisp=cl lisp:quit code))





More information about the slime-cvs mailing list