开发者

Setting up SLIME via macports

开发者 https://www.devze.com 2023-02-15 17:04 出处:网络
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 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!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消