我已经使用https://github.com/thephoeron/slime-pack安装了Slime,并想更深入地探索Common Lisp。
如何在Emacs中访问特定函数的源代码?
例如,如果我有一个函数:
我想要访问
如何在Emacs中访问特定函数的源代码?
例如,如果我有一个函数:
(type-of 1)
我想要访问
type-of
的源代码,怎么做呢?(type-of 1)
type-of
的源代码,怎么做呢?Meta .
调用函数: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
。
M-x find-function
。这对你有用吗?还有find-function-other-window
和find-function-other-frame
。 - lawlist