Next: , Previous: Recovery, Up: Commands



3.2.7 Cross-reference

SLIME's cross-reference commands are based on the support provided by the Lisp system, which varies widely between Lisps. For systems with no builtin XREF support SLIME queries a portable XREF package, which is taken from the CMU AI Repository and bundled with SLIME.

Each command operates on the symbol at point, or prompts if there is none. With a prefix argument they always prompt. You can either enter the key bindings as shown here or with the control modified on the last key, See Key bindings.

C-c C-w c
slime-who-calls
Show function callers.
C-c C-w r
slime-who-references
Show references to global variable.
C-c C-w b
slime-who-binds
Show bindings of a global variable.
C-c C-w s
slime-who-sets
Show assignments to a global variable.
C-c C-w m
slime-who-macroexpands
Show expansions of a macro.
M-x slime-who-specializes
Show all known methods specialized on a class.

There are also “List callers/callees” commands. These operate by rummaging through function objects on the heap at a low-level to discover the call graph. They are only available with some Lisp systems, and are most useful as a fallback when precise XREF information is unavailable.

C-c <
slime-list-callers
List callers of a function.
C-c >
slime-list-callees
List callees of a function.