[slime-devel] Putting FASLs compiled from emacs in the same place as ASDF

John Fremlin jf at msi.co.jp
Wed Mar 11 02:08:36 UTC 2009

Helmut Eller <heller at common-lisp.net> writes:

> * John Fremlin [2009-03-09 05:46+0100] writes:
>> Can I suggest this replacement for fasl-pathname? Or at least that a
>> convenient way of allowing a similar customization be integrated? (Maybe
>> allow *fasl-directory* to be a function?)
> I replaced *fasl-directory* with *fasl-pathname-function* which
> should give you complete control over the output filename.


Just in case anybody else wants to use the new system to put FASLs in
the same directory as chosen by asdf (i.e. common-lisp-controller or
asdf-binary-locations), here is my ~/.swank.lisp

(setf swank:*fasl-pathname-function* 
      (lambda(input-file options)
	(declare (ignore options))
	(or (ignore-errors
	      (first (asdf:output-files (make-instance 'asdf:compile-op) 
					(make-instance 'asdf:cl-source-file :name (pathname-name (pathname input-file))
						       :parent (make-instance 'asdf:module :pathname nil :name "")
						       :pathname nil))))
	    (compile-file-pathname input-file))))


More information about the slime-devel mailing list