设置 slime-enable-evaluate-in-emacs

7

我正在使用带有slime的SBCL,并且有以下代码:

(swank::eval-in-emacs
  '(with-current-buffer (slime-repl-buffer)
     (insert (propertize "foo" 'font-lock-face '(:foreground "red")))))

(print "here is some text")

一般而言,如果我试图执行任何带有 swank:: 前缀的东西,Emacs 就会提示安全错误,并告诉我需要将 slime-enable-evaluate-in-emacs 设置为 true。这个值在哪里?我没有找到 slime 或 swank 的配置和设置文件。非常感谢。
1个回答

5
您可以将以下内容添加到您的 .emacs 文件中:
(setq slime-enable-evaluate-in-emacs t)

如果非空,则Emacs中的下级Lisp可以评估任意表单。默认值为nil,因为此功能可能存在安全风险。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接