[mcclim-cvs] CVS mcclim

rgoldman rgoldman at common-lisp.net
Mon Apr 10 13:58:10 UTC 2006


Update of /project/mcclim/cvsroot/mcclim
In directory clnet:/tmp/cvs-serv22293

Modified Files:
	input-editing.lisp 
Log Message:
Changed the way possibilities are presented when complete-from-generator
is used in the command reader.  Now the list of possibilities generated
will be sorted alphabetically.  This solution is possibly not ideal, but 
I thought any better solution would require more widespread changes.


--- /project/mcclim/cvsroot/mcclim/input-editing.lisp	2006/03/10 21:58:13	1.49
+++ /project/mcclim/cvsroot/mcclim/input-editing.lisp	2006/04/10 13:58:10	1.50
@@ -767,7 +767,7 @@
 ;;; The possibilities action is different enough that I don't want to add to
 ;;; the spaghetti above...
 
-(defun complete-from-generator-possibilities  
+(defun complete-from-generator-possibilities
     (initial-string generator predicate)
   (let ((possibilities nil)
 	(nmatches 0)
@@ -783,12 +783,13 @@
       (funcall generator initial-string #'suggester)
       (if (and (eql nmatches 1)
 	       (string-equal initial-string (caar possibilities)))
+	  ;; return values are as from complete-from-generator, qv.
 	  (values (caar possibilities)
 		  t
 		  (cdar possibilities)
 		  nmatches
 		  possibilities)
-	  (values initial-string nil nil nmatches possibilities)))))
+	  (values initial-string nil nil nmatches (sort possibilities #'string-lessp :key #'car))))))
 
 (defun complete-from-possibilities (initial-string completions delimiters &key
 				    (action :complete)




More information about the Mcclim-cvs mailing list