史莱姆手册是这样说的: “更快地加载 Swank 对于 SBCL,我们建议您创建一个带有套接字支持和 POSIX 的自定义核心文件 包含绑定(bind),因为这些模块需要最多的时间来加载。要创建这样一个核心, 执行以下步骤:
shell$ sbcl
*(mapc ’require ’(sb-bsd-sockets sb-posix sb-introspect sb-cltl2 asdf))
*(save-lisp-and-die "sbcl.core-for-slime")
之后,将类似这样的内容添加到您的“.emacs”中:
(setq slime-lisp-implementations
’((sbcl ("sbcl" "--core" "sbcl.core-for-slime"))))"
我知道如何向我的 .emacs 文件中添加内容,但我对下面的部分到底做了什么它。 "执行以下步骤:
shell$ sbcl
* (mapc ’require ’(sb-bsd-sockets sb-posix sb-introspect sb-cltl2 asdf))
* (save-lisp-and-die "sbcl.core-for-slime")"
请具体点...我是菜鸟
最佳答案
I know how to add stuff to my .emacs file but what exactly do i do for the part below i\e where, exactly, and how do i execute the steps below....i\e where do i type it. "execute the following steps:
您在 shell 中启动您的 Lisp 实现,然后输入它的 REPL。虽然 Slime 是 Emacs 的 Common Lisp(以及更多语言)环境,但实际的 CL 实现不包含在 Emacs 中或不属于 Emacs。 (Emacs 本身使用一种有点相似但不同的方言 Emacs Lisp。)
因此,您必须单独安装 SBCL,启动它,然后在其 REPL 中输入上述命令。
(mapc #'require '(sb-bsd-sockets sb-posix sb-introspect sb-cltl2 asdf))
请注意,您必须使用 '
,而不是 '
才能正常工作。这将在您的 Lisp 镜像中加载系统,并且:
(save-lisp-and-die "sbcl.core-for-slime")
将该图像保存到文件 sbcl.core-for-slime
中。当您告诉 SBCL 使用该镜像(也称为 核心 镜像)时,您不必再次加载上述系统,因为它们已经是已加载镜像的一部分。原来如此
(setq slime-lisp-implementations
'((sbcl ("sbcl" "--core" "sbcl.core-for-slime"))))
在你的 .emacs
中 - 它告诉 SLIME 在启动 SBCL 时使用命令 sbcl --core sbcl.core-for-slime
。
另请注意,Common Lisp 是语言的名称,而 CLISP 只是一种实现,如 SBCL。我会相应地重新标记您的问题。
关于emacs - 在 "Slime"(最新版本)中设置 "emacs"时,我如何告诉它更快地加载 swank?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15062602/