[slime-devel] Re: custom tweaks for object system

Tobias C. Rittweiler tcr at freebits.de
Wed Aug 20 09:50:55 UTC 2008


David O'Toole <dto at gnu.org> writes:

> I would like this to work with SLIME's arguments list lookup and so on.
> My system retains all the documentation and arglist info at runtime so I
> could probably hook this up somehow. 
>
> Any suggestions on how I could make this work with SLIME?

First make sure that you use the slime-autodoc contrib. Then make sure
that the following is executed whenever you open one of your games'
source files:

  (modify-syntax-entry ?[ "(")
  (modify-syntax-entry ?] ")")

Now, we can customize the SWANK side. You can do that by using
~/.swank.lisp.

Basically all you have to do is to add an :AROUND method for the default
method of COMPUTE-ENRICHED-DECODED-ARGLIST like this:

  (defmethod compute-enriched-decoded-arglist :around
      (operator-form argument-forms)
    (unless (find-package "DTO")
      (return (call-next-method)))
    (let ((dto-method-arglist (dto:method-lambda-list operator-form)))
      (if dto-method-arglist
          (decode-arglist dto-method-arglist)
          (call-next-method))))

DTO:METHOD-LAMBDA-LIST should return the lambda-list of the method named
by the passed symbol.

I think that should be it. If you encounter problems, let me now.

  -T.




More information about the slime-devel mailing list