[Openmcl-devel] init-folder

R. Matthew Emerson rme at clozure.com
Mon Aug 15 16:53:49 UTC 2011

On Aug 15, 2011, at 10:05 AM, Janusz Podrazik wrote:

> this is what I do now each files is mapped.
> the question is how to assign a directory without mapping all files in the init.lisp file.

Are you looking for something like this?  (This would go in
the init file.)

(defparameter *init-directory* #p"ccl:init;") ;or wherever

(defun load-init-directory (dir)
  (let* ((wild (make-pathname :name :wild :type :wild :defaults dir))
	 (files (directory wild :directories nil :files t)))
    (dolist (f files)
      (with-simple-restart (contiune "Skip loading ~s" f)
	(load f :if-does-not-exist nil :verbose nil)))))

(load-init-directory *init-directory*)

Or were you looking for some way to customize the lisp so that
it doesn't load home:ccl-init.lisp at all, but instead looks
somewhere else entirely?

> On 15 Aug 2011, at 15:08, Tim Bradshaw wrote:
>> On 13 Aug 2011, at 10:03, Janusz Podrazik wrote:
>>> Howto:
>>> Instead of using an init-ccl.lisp file, I would like instead to assign a init folder.
>>> All files or subfolders in the that folder - lets say 'Startup' folder - would be loaded on startup of the application.
>> I'm not currently doing this, but I have in the past, and the trick is to write a minimal init file which maps over files in the appropriate directory, loading them.
> MRAC Publishing
> Janusz Podrazik
> info at mracpublishing.com
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

More information about the Openmcl-devel mailing list