chris <cnuern...@gmail.com> writes: > (defun get-classpath-list () > (if > (or > (eq 'windows-nt system-type) > (eq 'ms-dos system-type)) > (split-string (getenv "CLASSPATH") ";") > (split-string (getenv "CLASSPATH") ":"))) > > (setq swank-clojure-jar-path > (dev-dir "clojure/clojure.jar")) > (setq swank-clojure-extra-classpaths > (get-classpath-list)) > > Get the classpath from the system and set it as your swank classpath.
Thanks; this looks useful. But I've heard people say that using environment variables for your classpath should be avoided. I'm not sure what the reasoning behind this is though. Maybe it's just a case of "you should be explicit instead of implicit"; I could see how it would be annoying to track down problems that result from the value of an invisible variable that lives outside your code base. If the general consensus is that using environment variables is a good idea, then I can merge this into clojure-mode. For projects that depend on Java jars, my approach so far has been to construct the classpath list from a directory listing and then include the elisp code to do so in the source directory: (setq concourse-dir (file-name-directory (or (buffer-file-name) load-file-name)) swank-clojure-jar-path (concat concourse-dir "/jars/clojure.jar") swank-clojure-extra-classpaths (directory-files (concat concourse-dir "/jars/") t ".jar$")) -Phil --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---