[climacs-devel] Pathnames and cl-fad

John Q Splittist splittist at yahoo.com
Tue May 3 17:30:43 UTC 2005


Wondering why the Find File completion was funky on my openmcl+clx 
climacs, and after a delightful tour through the mcclim completion code, 
I realised that it's because (directory ...) on openmcl requires 
:directories t to list directories.

I made a start on adding this to gui.lisp, but I've ended up just 
replicating a portion of cl-fad (http://www.weitz.de/cl-fad/). I should 
really have gone further and conditionalized wildcard as well, and then 
further back... Is there any benefit to adding cl-fad as a dependency, 
or just adding cl-fad to the climacs distribution? (Or does it really 
live at the McClim level?)

Anywho, a diff is attached. Not tested on all the lisps listed.

JQS

--- gui.lisp.~1.128.~	Sat Mar 19 22:08:31 2005
+++ gui.lisp	Tue May  3 18:13:47 2005
@@ -621,9 +623,17 @@
  	   (full-so-far (concatenate 'string directory-prefix so-far))
  	   (pathnames
  	    (loop with length = (length full-so-far)
-		  for path in (directory (concatenate 'string
-						       (remove-trail so-far)
-						      "*.*"))
+		  and wildcard = (concatenate 'string (remove-trail so-far) "*.*")
+		  for path in
+		   #+(or :sbcl :cmu :lispworks) (directory wildcard)
+		   #+:openmcl (directory wildcard :directories t)
+		   #+:allegro (directory wildcard :directories-are-files nil)
+		   #+:clisp (nconc (directory wildcard)
+				   (directory (clisp-subdirectories-wildcard wildcard)))
+		   #+:cormanlisp (nconc (directory wildcard)
+					(cl::directory-subdirs dirname))
+		   #-(or :sbcl :cmu :lispworks :openmcl :allegro :clisp :cormanlisp)
+		     (directory wildcard)
  		  when (let ((mismatch (mismatch (namestring path) full-so-far)))
  			 (or (null mismatch) (= mismatch length)))
  		    collect path))





More information about the climacs-devel mailing list