【发布时间】:2011-11-04 08:08:37
【问题描述】:
我想在我的 Emacs 中学习 SICP。我已经安装了 MIT Scheme、Emacs 24 并下载了 sicp 信息(使用本指南 http://www.pchristensen.com/blog/articles/setting-up-and-using-emacs-infomode/)。现在我可以在专用缓冲区(M-x run-scheme)中运行方案解释器,但是当我尝试从 info 缓冲区(C-x C-e)发送定义表达式之一时出现以下错误:
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 中复制代码,然后他们使用 C-x C-e 执行它。但我想直接从信息缓冲区执行它。我该如何设置?
【问题讨论】: