fancy not loading with emacs sbcl slime windows configuration

I have slime with sbcl working in emacs 24.1 but can not get a slime repl to open.

I can use Mx slime to make a connection to sbcl in a inferior-lisp buffer but I can not invoke the slime-repl or get a nice lisp auto-indent when editing lisp files even though I am loading the slime-fancy contrib in .emacs. I don't get any error messages during start-up.

When I try Mx slime-repl I get [No match].

my .emacs file:

(setq inferior-lisp-program "sbcl")
(add-to-list 'load-path "c:/home/bin/emacs/site-lisp/slime/")
(require 'slime)
(require 'slime-autoloads)
(slime-setup '(slime-fancy))

I used this method for the installation:

http://www.pchristensen.com/blog/articles/installing-sbcl-emacs-and-slime-on-windows-xp

I have noticed a pattern that almost everything I try with Python and Clojure works as described and almost nothing I try related to common lisp works. I have also tried cusp with eclipse. I am willing to try yet another approach if there is something more recent for common lisp in windows.


After playing with Sujoy's answer and trimming it down to get it to work, I realized my original problem was caused by the (require 'slime) statement. The following .emacs file gets the slime repl to open as expected.

(setq inferior-lisp-program "sbcl")
(require 'slime-autoloads)
(slime-setup '(slime-fancy))

Only 'slime-fancy will not setup the REPL. Try the below snippet. Put it in a buffer and eval. Of course, you do not need to setup the hyperspec root as well, but that helps a lot :)

EDIT: missed out on the autoloads I am using, so here's the full config.

the keybinding (using minor-mode keymap, global mapping can be used just as easily)

(define-key my-keys-map (kbd "<f5>") 'slime)

the autoloads

;; slime mode
(autoload 'slime "my-slime" "Slime mode." t)
(autoload 'slime-connect "my-slime" "Slime mode." t)

Here's my-slime.el

(provide 'my-slime)
(eval-after-load "slime"
     (setq slime-lisp-implementations
     (slime-setup '(slime-asdf
                    slime-autodoc
                    slime-editing-commands
                    slime-fancy
                    slime-fontifying-fu
                    slime-fuzzy
                    slime-indentation
                    slime-mdot-fu
                    slime-package-fu
                    slime-references
                    slime-repl
                    slime-sbcl-exts
                    slime-scratch
                    slime-xref-browser))
     (slime-autodoc-mode)
     (setq slime-complete-symbol*-fancy t
           slime-complete-symbol-function 'slime-fuzzy-complete-symbol
           slime-when-complete-filename-expand t
           slime-truncate-lines nil
           slime-autodoc-use-multiline-p t)
     (add-hook 'lisp-mode-hook (lambda () (slime-mode t)))))
(require 'slime)
链接地址: http://www.djcxy.com/p/67608.html

上一篇: repl不在这里

下一篇: 看上去不加载emacs sbcl slime windows配置