使用粘液时,如何跳转到emacs中的函数定义? [英] how do I jump to a function definition in emacs when using slime?

查看:123
本文介绍了使用粘液时,如何跳转到emacs中的函数定义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用 https://github.com/thephoeron/slime-pack 安装粘液并且想要探索common-lisp。

I have installed slime using https://github.com/thephoeron/slime-pack and want to explore the common-lisp a bit more.

如何在emacs中访问特定函数的源代码?

How do I access the source for a particular function in emacs?

,如果我有一个功能:

(type-of 1)

,我想访问类型的的来源,如何这样做?

and I want to visit the source of type-of, how can this be done?

推荐答案

它调用函数: slime-edit-definition

跳转在您的lisp实现中,您可能需要做一些额外的操作来指向源代码。在SBCL中,您必须将 sb-ext:set-sbcl-source-location 转到正确的位置。 Ej:

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. E.j:

(sb-ext:set-sbcl-source-location "/path/to/sbcl/")

这篇关于使用粘液时,如何跳转到emacs中的函数定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆