I have installed slime using https://github.com/thephoeron/slime-pack and want to explore the common-lisp a bit more.
How do I access the source for a particular function in emacs?
for example, if I have a function:
(type-of 1)
and I want to visit the source of type-of
, how can this be done?
M-. key will take you to the function definition emacs.
emacs. d/ . The first lisp file you load you may need to perform M-x slime , which means holding down either Alt or Escape, then hitting the letter 'x'. A prompt will appear at the bottom of the editor (in the minibuffer) where you type "slime" and hit enter.
Meta .
It calls the function: slime-edit-definition
For jumping to functions inside your lisp implementation you may need to do something extra to point to the sources. In SBCL you have to sb-ext:set-sbcl-source-location
to the correct place in .sbclrc
:
(sb-ext:set-sbcl-source-location "/path/to/sbcl/")
You can edit .sbclrc
with C-xC-f ~/.sbclrc
in Emacs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With