[slime-devel] [PATCH] add eldoc support (take 2)

Luke Gorrie luke at bluetail.com
Thu Nov 6 09:16:43 UTC 2003


"Sean O'Rourke" <sorourke at cs.ucsd.edu> writes:

> Take 2 on adding eldoc support to SLIME.  Things to note:
> 
> - support for GNU version >= 21.3 using hook
>   ``eldoc-print-current-symbol-info-function''; older versions use
>   advice.
> - 2 approaches to caching arglist lookups; see variable
>   ``slime-cache-type'' for details.
> - avoids interning symbols when looking for functions that don't
>   exist.
> - function ``slime-documentation'' to display documentation rather
>   than description for thing-at-point.
> 
> Try it out!  Comments welcome.

Groovy!

I've committed this, but I hacked it a bit - particularly I took out
the use of eldoc in favour of post-command-hook. The advice and
version-specific tests give me the willies, since supporting Emacs20,
Emacs21, and XEmacs 21 is already a fair bit of work and I don't want
to tempt fate by relying on internal details :-)

Now there's a function `slime-autodoc' that is called after every
Emacs command in a slime-mode buffer (but only if `slime-autodoc-mode'
is set to non-nil), and its job is to try to print some useful
information. Currently it prints the arglist of any function-call at
point.

Is this equivalent to what we got from eldoc, or did I miss something?

Anyway, my version isn't perfect, but it's integrated and should serve
as a foothold for further hacking. One nice thing that eldoc does and
this doesn't is to distinguish between function and variable
references in the source to lookup the appropriate documentation -
very nice.

Cheers,
Luke





More information about the slime-devel mailing list