Permalink
Browse files

(inspect-for-emacs): Use the backend specific method to inspect

standard-objects because {slot-boundp,slot-value}-using-class don't
conform to the MOP spec in LW and ACL.
  • Loading branch information...
1 parent 41632c1 commit dc71b6e551cc8a7bcf985622c065ecbf01f6a95e Helmut Eller committed Feb 10, 2006
Showing with 11 additions and 2 deletions.
  1. +4 −2 swank-allegro.lisp
  2. +7 −0 swank-lispworks.lisp
View
@@ -480,7 +480,6 @@
(defimplementation make-default-inspector ()
(make-instance 'acl-inspector))
-#-allegro-v5.0
(defmethod inspect-for-emacs ((f function) inspector)
inspector
(values "A function."
@@ -499,6 +498,10 @@
inspector
(values "A function." (allegro-inspect o)))
+(defmethod inspect-for-emacs ((o standard-object) (inspector acl-inspector))
+ inspector
+ (values (format "~A is a standard-object." o) (allegro-inspect o)))
+
(defun allegro-inspect (o)
(loop for (d dd) on (inspect::inspect-ctl o)
append (frob-allegro-field-def o d)
@@ -633,7 +636,6 @@
(eval `(trace (,fspec ,@args)))
(format nil "~S is now traced." fspec))))
-#-allegro-v5.0
(defun toggle-trace-generic-function-methods (name)
(let ((methods (mop:generic-function-methods (fdefinition name))))
(cond ((tracedp name)
@@ -641,6 +641,13 @@ function names like \(SETF GET)."
(declare (ignore inspector))
(lispworks-inspect o))
+;; FIXME: slot-boundp-using-class in LW works with names so we can't
+;; use our method in swank.lisp.
+(defimplementation inspect-for-emacs ((o standard-object)
+ (inspector lispworks-inspector))
+ (declare (ignore inspector))
+ (lispworks-inspect o))
+
(defun lispworks-inspect (o)
(multiple-value-bind (names values _getter _setter type)
(lw:get-inspector-values o nil)

0 comments on commit dc71b6e

Please sign in to comment.