SLIME tidbits (2009-09-20)

Today I'll write about a very recent new addition: slime-edit-uses bound to the keys M-? and M-_.

It is the logical counterpart to slime-edit-definition (M-.) .

Basically, it's nothing more than a wrapper around the already existing Xref commands (slime-who-calls, etc.) but it's a pleasure to use because a) it's just one key binding which does all instead of a multitude of different special-purpose bindings, and b) it's an easy binding (M-? vs. C-c C-w KEY) and obvious as well (right next to M-. its counterpart.)

What does it do? Well see for yourself:

  • on functions, it'll show a list of all call sites.
  • on macros, it'll show a list of the sites the macro is expanded.
  • on special variables, it'll list all the places the variable is set, bound, or referenced.
  • on classes, it'll show a list of methods that specialize on that class. (no screenshot)
Of course, the usual disclaimer applies: The quality of this feature highly depends on how much Xref information your implementation is able to store.

Now, for me this begets the following question: How easy would it be to make SBCL collect Xref data during the build of itself?

No comments: