[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [none]



   Date: Tue, 27 Jun 89 12:45:31 PDT
   From: whaley@june.cs.washington.edu (Ken Whaley)

   I'd like load to load the most recent of the .cl and .fasl file
   automatically.  I can't find anything in the manual describing how
   to do this from LISP.

You can use the search list to do this.  By default the system search
list (stored under sys:*load-search-list*) it is set up to look
something like:

(
 *default-pathname-defaults*
 #p(:type "fasl")
 #p(:type "cl")
 #p(:type "lisp")
 excl::*library-code-fasl-pathname*
 excl::*library-code-cl-pathname*
 excl::*library-code-bin-pathname*
)

Allegro CL does a merge-pathnames which each item in this list until
it finds a real file.  To get the behavior I think you want, you can
change sys:*load-search-list* to be something like

(
 *default-pathname-defaults*
 (:newest			<<< This means get the youngest file which
  #p(:type "fasl")		<<< satisfies merge-pathnames on this list.
  #p(:type "cl")
  #p(:type "lisp"))
 excl::*library-code-fasl-pathname*
 excl::*library-code-cl-pathname*
 excl::*library-code-bin-pathname*
 )

If you don't want to change the sys:*load-search-list*, you can create
your own and specify it to the load function.  This is all documented
in Ch. 7 of the Allegro CL User Guide.