Forked from
cmucl / cmucl
Source project has a limited visibility.
-
chiles authored
Modified COMPLETE-FILE to correctly complete files relative to the defaults. It was previously relying on MERGE-PATHNAMES solely, but MERGE-PATHNAMES cannot do what COMPLETE-FILE requires when presented with a partial (non-absolute) pathname that includes some directories. What the user wants is the partial pathname to be merged with the absolute defaults including any directories specified in pathname. MERGE-PATHNAMES cannot do this since partial pathnames have independent uses, and it cannot clobber a non-nil slot in the partial pathname structure. However, COMPLETE-FILE obtains its partial pathnames from users specifying against defaults with the intent of deriving an absolute name, so when the defaults contain an absolute directory slot, the partial directory spec of the supplied pathname (if any) gets tacked onto the end of the defaults directory spec. This fixes a long standing Hemlock problem: you could find files relative to the defaults with subdirectory specs, but you could not complete them. Fixed DIRECTORY to no longer signal errors. It's job is to return a list of files matching its argument, and it should return nil when the spec is in accurate.
chiles authoredModified COMPLETE-FILE to correctly complete files relative to the defaults. It was previously relying on MERGE-PATHNAMES solely, but MERGE-PATHNAMES cannot do what COMPLETE-FILE requires when presented with a partial (non-absolute) pathname that includes some directories. What the user wants is the partial pathname to be merged with the absolute defaults including any directories specified in pathname. MERGE-PATHNAMES cannot do this since partial pathnames have independent uses, and it cannot clobber a non-nil slot in the partial pathname structure. However, COMPLETE-FILE obtains its partial pathnames from users specifying against defaults with the intent of deriving an absolute name, so when the defaults contain an absolute directory slot, the partial directory spec of the supplied pathname (if any) gets tacked onto the end of the defaults directory spec. This fixes a long standing Hemlock problem: you could find files relative to the defaults with subdirectory specs, but you could not complete them. Fixed DIRECTORY to no longer signal errors. It's job is to return a list of files matching its argument, and it should return nil when the spec is in accurate.