Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up SLIME via macports

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!

like image 752
hedgehogrider Avatar asked Mar 08 '11 09:03

hedgehogrider


1 Answers

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.

like image 95
sanityinc Avatar answered Nov 08 '22 06:11

sanityinc