/[slime]/slime/swank-clisp.lisp
ViewVC logotype

Diff of /slime/swank-clisp.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.43 by heller, Mon Nov 29 17:35:03 2004 UTC revision 1.44 by heller, Sun Dec 5 15:25:37 2004 UTC
# Line 40  Line 40 
40    (defvar *have-mop*    (defvar *have-mop*
41      (and (find-package :clos)      (and (find-package :clos)
42           (eql :external           (eql :external
43                (nth-value 1 (find-symbol (string ':standard-slot-definition) :clos))))                (nth-value 1 (find-symbol (string ':standard-slot-definition)
44                                            :clos))))
45      "True in those CLISP imagse which have a complete MOP implementation."))      "True in those CLISP imagse which have a complete MOP implementation."))
46    
47  #+#.(cl:if swank-backend::*have-mop* '(cl:and) '(cl:or))  #+#.(cl:if swank-backend::*have-mop* '(cl:and) '(cl:or))
48  (progn  (progn
49    (import-to-swank-mop    (import-swank-mop-symbols :clos '(:slot-definition-documentation))
    '( ;; classes  
      cl:standard-generic-function  
      clos:standard-slot-definition  
      cl:method  
      cl:standard-class  
      clos::eql-specializer  
      ;; 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  
      clos:specializer-direct-methods  
      ;; eql-specializer accessors  
      clos::eql-specializer-object  
      ;; 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))  
50    
51    (defun swank-mop:slot-definition-documentation (slot)    (defun swank-mop:slot-definition-documentation (slot)
52      (clos::slot-definition-documentation slot)))      (clos::slot-definition-documentation slot)))
# Line 96  Line 54 
54  #-#.(cl:if swank-backend::*have-mop* '(and) '(or))  #-#.(cl:if swank-backend::*have-mop* '(and) '(or))
55  (defclass swank-mop:standard-slot-definition ()  (defclass swank-mop:standard-slot-definition ()
56    ()    ()
57    (:documentation "Dummy class created so that swank.lisp will compile and load."))    (:documentation
58       "Dummy class created so that swank.lisp will compile and load."))
59    
60  #+linux  #+linux
61  (defmacro with-blocked-signals ((&rest signals) &body body)  (defmacro with-blocked-signals ((&rest signals) &body body)
# Line 121  Line 80 
80  (defimplementation call-without-interrupts (fn)  (defimplementation call-without-interrupts (fn)
81    (funcall fn))    (funcall fn))
82    
83  #+unix (defmethod getpid () (system::program-id))  #+unix
84    (defmethod getpid ()
85      (system::program-id))
86  #+win32  #+win32
87  (defmethod getpid ()  (defmethod getpid ()
88    (cond ((find-package :win32)    (cond ((find-package :win32)
# Line 523  Execute BODY with NAME's funtion slot se Line 484  Execute BODY with NAME's funtion slot se
484                        (sys::insp-blurb inspection))                        (sys::insp-blurb inspection))
485                (loop with count = (sys::insp-num-slots inspection)                (loop with count = (sys::insp-num-slots inspection)
486                      for i upto count                      for i upto count
487                     for (value name) = (multiple-value-list (funcall (sys::insp-nth-slot inspection) i))                      for (value name) = (multiple-value-list
488                     collect `(:value ,name)                                          (funcall (sys::insp-nth-slot
489                     collect " = "                                                    inspection) i))
490                     collect `(:value ,value)                      collect `((:value ,name) " = " (:value ,value)
491                     collect '(:newline))))))                                (:newline)))))))
   
 #-#.(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.")))  
   
   (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.")))  
   
   (defmethod inspect-for-emacs ((slot swank-mop:standard-slot-definition) (inspector t))  
     (declare (ignore inspector))))  
492    
493  (defimplementation quit-lisp ()  (defimplementation quit-lisp ()
494    #+lisp=cl (ext:quit)    #+lisp=cl (ext:quit)

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

  ViewVC Help
Powered by ViewVC 1.1.5