work on require supporting foo::bar
Norbert Preining
8 years ago
132 | 132 |
nil))
|
133 | 133 |
(error "is-simple-file-name? : given non string arg ~a" path))))
|
134 | 134 |
|
|
135 |
(defun is-relative-file-name? (path)
|
|
136 |
(declare (type (or simple-string pathname) path)
|
|
137 |
(values (or null t)))
|
|
138 |
(let ((pn (if (pathnamep path)
|
|
139 |
path
|
|
140 |
(if (stringp path)
|
|
141 |
(pathname path)
|
|
142 |
(error "is-relative-file-name? : given non string arg ~a" path)))))
|
|
143 |
(if (or (null (pathname-directory pn))
|
|
144 |
(member ':relative (pathname-directory pn) :test #'equal))
|
|
145 |
t
|
|
146 |
nil)))
|
|
147 |
|
135 | 148 |
(defun supply-suffixes (path suffixes)
|
136 | 149 |
(declare (type (or simple-string pathname) path)
|
137 | 150 |
(type list suffixes)
|
|
161 | 174 |
(when (and load-path (atom load-path))
|
162 | 175 |
(setq load-path (list load-path)))
|
163 | 176 |
;;
|
164 | |
(cond ((is-simple-file-name? file)
|
|
177 |
(cond ((is-relative-file-name? file)
|
165 | 178 |
(let ((file-path (chaos-get-relative-path*
|
166 | 179 |
(concatenate 'string "./" file)))
|
167 | 180 |
(res nil))
|