我想在我的 Emacs 中学习 SICP。我已经安装了 MIT Scheme、Emacs 24 并下载了 sicp 信息(使用本指南http://www.pchristensen.com/blog/articles/setting-up-and-using-emacs-infomode/)。现在我可以在专用缓冲区(Mx run-scheme)中运行方案解释器,但是当我尝试从信息缓冲区(Cx Ce)发送定义表达式之一时出现以下错误:
Debugger entered--Lisp error: (void-function define)
(define (abs x) (cond ((> x 0) x) ((= x 0) 0) ((< x 0) (- x))))
eval((define (abs x) (cond ((> x 0) x) ((= x 0) 0) ((< x 0) (- x)))) nil)
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
看起来 Emacs 正在尝试使用 Lisp 解释器执行此代码。作为此问题的解决方法,我现在打开方案缓冲区(*.scm 文件),从 info 中将代码复制到其中,然后他们使用 Cx Ce 执行它。但我想直接从信息缓冲区执行它。我该如何设置?