-;;; a helper function for INTERNAL-LOAD-DEFAULT-TYPE
-(defun try-default-types (pathname types lp-type)
- ;; Modified 18-Jan-97/pw for logical-pathname support.
- ;;
- ;; FIXME: How does logical-pathname support interact with
- ;; *LOAD-SOURCE-TYPES* and *LOAD-OBJECT-TYPES*?
- (flet ((frob (pathname type)
- (let* ((pn (make-pathname :type type :defaults pathname))
- (tn (probe-file pn)))
- (values pn tn))))
- (if (typep pathname 'logical-pathname)
- (frob pathname lp-type)
- (dolist (type types (values nil nil))
- (multiple-value-bind (pn tn) (frob pathname type)
- (when tn
- (return (values pn tn))))))))
+;;; a helper function for INTERNAL-LOAD-DEFAULT-TYPE: Try the default
+;;; file type TYPE and return (VALUES PATHNAME TRUENAME) for a match,
+;;; or (VALUES PATHNAME NIL) if the file doesn't exist.
+;;;
+;;; This is analogous to CMU CL's TRY-DEFAULT-TYPES, but we only try a
+;;; single type. By avoiding CMU CL's generality here, we avoid having
+;;; to worry about some annoying ambiguities. (E.g. what if the
+;;; possible types are ".lisp" and ".cl", and both "foo.lisp" and
+;;; "foo.cl" exist?)
+(defun try-default-type (pathname type)
+ (let ((pn (make-pathname :type type :defaults pathname)))
+ (values pn (probe-file pn))))