The following patch is a work-around (excuse the pun) to have the fancy-inspector use the SBCL-specific method for function inspection.
Ariel
diff -u -r1.193 swank-sbcl.lisp --- swank-sbcl.lisp 28 Feb 2008 19:44:14 -0000 1.193 +++ swank-sbcl.lisp 3 Mar 2008 04:09:39 -0000 @@ -1041,7 +1041,7 @@ (loop for value in parts for i from 0 append (label-value-line i value))))))))
-(defmethod emacs-inspect ((o function)) +(defmethod emacs-inspect :around ((o function)) (let ((header (sb-kernel:widetag-of o))) (cond ((= header sb-vm:simple-fun-header-widetag) (label-value-line*
* Ariel Badichi [2008-03-03 05:17+0100] writes:
The following patch is a work-around (excuse the pun) to have the fancy-inspector use the SBCL-specific method for function inspection.
Ariel
diff -u -r1.193 swank-sbcl.lisp --- swank-sbcl.lisp 28 Feb 2008 19:44:14 -0000 1.193 +++ swank-sbcl.lisp 3 Mar 2008 04:09:39 -0000 @@ -1041,7 +1041,7 @@ (loop for value in parts for i from 0 append (label-value-line i value))))))))
-(defmethod emacs-inspect ((o function)) +(defmethod emacs-inspect :around ((o function)) (let ((header (sb-kernel:widetag-of o))) (cond ((= header sb-vm:simple-fun-header-widetag) (label-value-line*
My CLOS skills are pretty much not existent, perhaps somebody could help me out on this. Would it be bad style to do the following in the fancy-inspector?
(unless (find-method #'emacs-inspect nil '(function) nil) (defmethod emacs-inspect ((f function)) ...))
I.e. define the method only if the backend didn't provide one. Or can ADD-METHOD be used for this purpose?
Helmut.
On 3/4/08, Helmut Eller heller@common-lisp.net wrote:
My CLOS skills are pretty much not existent, perhaps somebody could help me out on this. Would it be bad style to do the following in the fancy-inspector?
IMO not horribly so, though
(find-method #'swank:emacs-inspect () (list (find-class 'function)))
should be more portable. #-swank-backend-inspects-functions would be another option.
...but if beauty and code-reuse is a goal, maybe
(append ...portable-stuff.. (swank-backend:inspect-parts ...))
would be worth considering.
Cheers,
-- Nikodemus