Having used the clim listener, I wondered if it would be possible to make things in the SLIME repl clicky in the same way that they are there.
It turns out that this isn't too much of a problem, though the regexp horror was almost too much. I present herewith a minimal first example of use. Probably only works in SBCL, since that's what the regexp has been tested with, I don't know when the 'mouse-face text property was introduced in Emacs (or if it even exists in XEmacs), so, you might lose there, and I don't think that the 'keymap text property works in XEmacs.
How it works:
When the repl receives some output, it gets passed through SLIME-MAKE-CLICKY-THINGS, which looks for stuff of the form:
#<name something>
where something can have spaces in it. Then, depending on what NAME is, the relevant bit of the output is propertized, and inserted. Currently, it handles PACKAGE, FUNCTION, and foo-CLASS, the last is assumed to be a class of some kind.
A local keymap is installed, which is accessible via mouse-3, and allows you to do things like describe the thing, or see it's documentation, etc...
This requires one minor patch to swank.lisp, defining a DESCRIBE-PACKAGE function.
Index: swank.lisp =================================================================== RCS file: /project/slime/cvsroot/slime/swank.lisp,v retrieving revision 1.79 diff -u -r1.79 swank.lisp --- swank.lisp 14 Dec 2003 07:52:31 -0000 1.79 +++ swank.lisp 14 Dec 2003 21:44:31 -0000 @@ -724,6 +724,10 @@ (print-description-to-string (symbol-function (find-symbol-designator symbol-name))))
+(defslimefun describe-package (symbol-name) + (print-description-to-string + (find-package symbol-name))) + (defslimefun documentation-symbol (symbol-name &optional default) (let ((*package* *buffer-package*)) (let ((vdoc (documentation (symbol-from-string symbol-name) 'variable))
And the file itself: