Hi all,

now I've solved my "swank-clojure doesn't use my extra classpath and
init files" problems.  This didn't work, cause I had something like this
in my .emacs:

--8<---------------cut here---------------start------------->8---
(add-to-list 'load-path "~/repos/el/swank-clojure")
(setq swank-clojure-jar-path "~/repos/clj/clojure/clojure.jar")

(require 'swank-clojure-autoload)

(swank-clojure-config
  (add-to-list 'swank-clojure-extra-classpaths 
"~/repos/clj/programming-clojure/")
  (add-to-list 'swank-clojure-init-files
               (expand-file-name "~/.clojure/user.clj")))
--8<---------------cut here---------------end--------------->8---

The problem was, that in the required autoload file there's

--8<---------------cut here---------------start------------->8---
(eval-after-load "slime"
  '(progn
     (require 'swank-clojure)
     (add-to-list 'slime-lisp-implementations `(clojure ,(swank-clojure-cmd) 
:init swank-clojure-init) t)
     (add-hook 'slime-indentation-update-hooks 
'swank-clojure-update-indentation)
     (add-hook 'slime-repl-mode-hook 'swank-clojure-slime-repl-modify-syntax t)
     (add-hook 'clojure-mode-hook 'swank-clojure-slime-mode-hook t)))
--8<---------------cut here---------------end--------------->8---

so after loading slime, the clojure command is build by calling
`swank-clojure-cmd'.  Unfortunately at slime load time the init files
and extra classpaths weren't set, cause `swank-clojure-config' is only a
wrapper around (eval-after-load "swank-clojure" ...).

So for now I use

--8<---------------cut here---------------start------------->8---
(add-to-list 'load-path "~/repos/el/swank-clojure")
(setq swank-clojure-jar-path "~/repos/clj/clojure/clojure.jar")

(eval-after-load 'swank-clojure
  '(progn
     (add-to-list 'swank-clojure-extra-classpaths 
"~/repos/clj/programming-clojure/")
     (add-to-list 'swank-clojure-init-files
                  (expand-file-name "~/.clojure/user.clj"))))

(require 'swank-clojure-autoload)
--8<---------------cut here---------------end--------------->8---

which seems to work.  It's absolutely necessary to require the autoload
file after the eval-after-load!  So I'd vote for removing the
`swank-clojure-config' wrapper.  It confuses more than it helps.

Bye,
Tassilo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to