Search code examples
emacslispslime

How to install the slime into emacs under Windows7


How to install the slime into emacs under Win7?

I download a compact package with '.tgz'. But it seems for linux. But there is really not one thing for windows(win 32 OS).

I unfold this package and I find there are lots of documents.


Solution

  • It's actually the same as for other operating systems, as far as I can tell. (At least, it always worked for me under FreeBSD/ArchLinux/Win7.) First, you unpack to a location you like, then add something like this to your .emacs (assuming you unpacked somewhere under your user directory):

    (add-to-list 'load-path "~/my/path/to/slime/")
    ;; (add-to-list 'load-path "~/my/path/to/slime/contrib/") ; for optional features
    
    (slime-setup
    ;; '(slime-fancy slime-asdf slime-references              ; optional features
    ;;   slime-indentation slime-xref-browser)
    )
    
    (setq slime-lisp-implementations
          '((ccl ("~/path/to/ccl/wx86cl"))
            (clisp ("~/path/to/clisp-2.49/clisp" "-modern"))) ; giving a command arg
          slime-default-lisp 'ccl)
    

    Restart Emacs or type C-x C-e behind each of these toplevel forms. Then, type M-x slime RET (or C-u M-x slime RET if you want to choose between the implementations in slime-lisp-implementations, otherwise slime-lisp-default will be used) and it should just work (it does for me). The setting of slime-lisp-implementations is optional – you can also give the path to your lisp implementation executable by hand when starting Slime.

    Assuming you want to use Slime with CL, since there is no Clojure tag. If you want to use it with Clojure, things are unfortunately a little different and both versions don't play very nicely together. The recommended way for use with Clojure, last time I checked, would be installation using the package system of Emacs 24 or, if you're using an older version, ELPA (which is essentially the same).