Ignore:
Timestamp:
Sep 30, 2007, 12:40:36 AM (13 years ago)
Author:
gz
Message:

Make find-module-pathnames handle wildcards, and put "ccl:examples;;" on *module-search-path*.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/easygui/ccl/level-1/l1-files.lisp

    r6939 r7324  
    12561256(defun require (module &optional pathname)
    12571257  "Loads a module, unless it already has been loaded. PATHNAMES, if supplied,
    1258    is a designator for a list of pathnames to be loaded if the module
     1258   is a designator for a list of pathnames to be loaded if the/Users/gz/OpenMCL/trunk/ccl/examples/cocoa/easygui.lisp module
    12591259   needs to be. If PATHNAMES is not supplied, functions from the list
    12601260   *MODULE-PROVIDER-FUNCTIONS* are called in order with MODULE-NAME
     
    12861286  (let ((mod-path (make-pathname :name (string-downcase module) :defaults nil)) path)
    12871287        (dolist (path-cand *module-search-path* nil)
    1288           (when (setq path (find-load-file (merge-pathnames mod-path path-cand)))
    1289             (return path)))))
     1288          (let ((mod-cand (merge-pathnames mod-path path-cand)))
     1289            (if (wild-pathname-p path-cand)
     1290                (let* ((untyped-p (member (pathname-type mod-cand) '(nil :unspecific)))
     1291                       (matches (if untyped-p
     1292                                    (or (directory (merge-pathnames mod-cand *.lisp-pathname*))
     1293                                        (directory (merge-pathnames mod-cand *.fasl-pathname*)))
     1294                                    (directory mod-cand))))
     1295                  (when (and matches (null (cdr matches)))
     1296                    (return (if untyped-p
     1297                                (make-pathname :type nil :defaults (car matches))
     1298                                (car matches)))))
     1299                (when (setq path (find-load-file (merge-pathnames mod-path path-cand)))
     1300                  (return path)))))))
    12901301
    12911302(defun wild-pathname-p (pathname &optional field-key)
Note: See TracChangeset for help on using the changeset viewer.