通过 macports 设置 SLIME

发布于 2024-10-20 23:00:22 字数 944 浏览 0 评论 0原文

我尽可能按照说明在 Mac OS X 上安装终端 SLIME,但是当我按 Mx 时,它不会提示我。

我使用以下两个 sudo 命令安装了 emacs 和 Lisp:

sudo port install emacs +carbon
sudo port install sbcl slime

我得到以下说明:

(add-to-list 'load-path "/opt/local/share/emacs/site-lisp/slime")
(require 'slime-autoloads)
(setq slime-lisp-implementations
     `((sbcl ("/opt/local/bin/sbcl"))
       (abcl ("/opt/local/bin/abcl"))
       (clisp ("/opt/local/bin/clisp"))))
(add-hook 'lisp-mode-hook
           (lambda ()
             (cond ((not (featurep 'slime))
                    (require 'slime) 
                    (normal-mode)))))

(eval-after-load "slime"
   '(slime-setup '(slime-fancy slime-banner)))

使用以下内容填充 SLIME-LISP-IMPLMENTATIONS 中的初始化列表 您想要使用的 Common Lisp 可执行文件的正确路径。

我不确定最后一点是什么意思...

无论如何,我以前从未使用过 Lisp 或 emacs,大多数文字 n00b 定向指令是最好的。只是用 emacs 编写和执行 common lisp 的最低限度。 谢谢!

I followed the instructions as best I could for installing terminal SLIME on Mac OS X, but when I press M-x it does not prompt me.

I installed emacs and Lisp using the following two sudo commands:

sudo port install emacs +carbon
sudo port install sbcl slime

I got the following instructions:

(add-to-list 'load-path "/opt/local/share/emacs/site-lisp/slime")
(require 'slime-autoloads)
(setq slime-lisp-implementations
     `((sbcl ("/opt/local/bin/sbcl"))
       (abcl ("/opt/local/bin/abcl"))
       (clisp ("/opt/local/bin/clisp"))))
(add-hook 'lisp-mode-hook
           (lambda ()
             (cond ((not (featurep 'slime))
                    (require 'slime) 
                    (normal-mode)))))

(eval-after-load "slime"
   '(slime-setup '(slime-fancy slime-banner)))

Populate the initialization list in SLIME-LISP-IMPLEMENTATIONS with
the correct paths to the Common Lisp exectuables you wish to use.

I'm not sure what that last bit means...

Anyways, I've never used Lisp or emacs before, most literal n00b directed instructions would be best. Just the bare minimum to write and execute common lisp with emacs.
Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜空下最亮的亮点 2024-10-27 23:00:22

看起来您已经走在正确的轨道上了。由于您只安装了 sbcl,而不是其他 lisp,因此只需将初始化代码缩减为这样:

(add-to-list 'load-path "/opt/local/share/emacs/site-lisp/slime")
(require 'slime-autoloads)
(setq slime-lisp-implementations `((sbcl ("/opt/local/bin/sbcl")))
(add-hook 'lisp-mode-hook
  (lambda () (cond ((not (featurep 'slime)) (require 'slime) (normal-mode)))))
(eval-after-load "slime" '(slime-setup '(slime-fancy slime-banner)))

之后,使用 Mx slime,您应该可以轻松地去。

Looks like you're on the right track already. Since you've only installed sbcl, and not the other lisps, just cut your initialization code down to this:

(add-to-list 'load-path "/opt/local/share/emacs/site-lisp/slime")
(require 'slime-autoloads)
(setq slime-lisp-implementations `((sbcl ("/opt/local/bin/sbcl")))
(add-hook 'lisp-mode-hook
  (lambda () (cond ((not (featurep 'slime)) (require 'slime) (normal-mode)))))
(eval-after-load "slime" '(slime-setup '(slime-fancy slime-banner)))

After that, use M-x slime, and you should be good to go.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文