[slime-devel] Setting FASL directory

Attila Lendvai attila.lendvai at gmail.com
Sun Sep 20 22:52:40 UTC 2009


> I'd like to be able to set the location of the *.fasl files that are
> ending up in ~/.slime/fasl/..., preferably from my .emacs.


here's what we use. this way swank stores its fasl's where asdf does
(so, if you have asdf-binary-location set up, then slime will store
its fasl's accordingly):

(defun load-swank ()
  (let ((*package* (find-package :hu.dwim.asdf)))
    (format *debug-io* "; Loading swank...~%")
    (load (system-relative-pathname :swank "swank-loader.lisp"))
    (format *debug-io* "; Setting up swank...~%")
    (eval
     (read-from-string
      "(progn
         (setf swank-loader:*fasl-directory*
               (merge-pathnames (make-pathname :directory `(:relative
\"slime\" ,@(list (swank-loader::slime-version-string))))
                                (first
(asdf::output-files-using-mappings \"\" (list
(system-relative-pathname :swank \"\")) ()))))
         (swank-loader:init))"))
    #+sbcl
    (unless (find-symbol "SWANK-PROFILE-GET-CALL-GRAPH" (find-package
"SWANK-BACKEND"))
      (format *debug-io* "; Loading up swank-sprof...~%")
      (load (merge-pathnames
"hu.dwim.environment/source/swank-sprof.lisp" *workspace-directory*)))
    (eval (read-from-string "(setf swank:*globally-redirect-io* t)"))))

hth,

-- 
 attila




More information about the slime-devel mailing list