gpt4 book ai didi

emacs - 使用 slime 时如何跳转到 emacs 中的函数定义?

转载 作者:行者123 更新时间:2023-12-02 11:54:51 29 4
gpt4 key购买 nike

我已经使用 https://github.com/thephoeron/slime-pack 安装了 slime并想进一步探索 common-lisp。

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

例如,如果我有一个函数:

(type-of 1)

我想访问type-of的源代码,如何实现?

最佳答案

.

它调用函数:slime-edit-definition

为了跳转到 Lisp 实现中的函数,您可能需要做一些额外的事情来指向源代码。在 SBCL 中,您必须将 sb-ext:set-sbcl-source-location 移动到 .sbclrc 中的正确位置:

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

您可以在 Emacs 中使用 C-xC-f ~/.sbclrc 编辑 .sbclrc

关于emacs - 使用 slime 时如何跳转到 emacs 中的函数定义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24818321/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com