[slime-cvs] CVS slime/contrib

trittweiler trittweiler at common-lisp.net
Fri Mar 14 14:31:52 UTC 2008


Update of /project/slime/cvsroot/slime/contrib
In directory clnet:/tmp/cvs-serv21260/contrib

Modified Files:
	swank-fuzzy.lisp 
Log Message:

* swank-fuzzy.lisp (fuzzy-convert-matching-for-emacs): Return a
  string representation of the classifications rather than the
  classifications themselves. (Notice this propagates up to (and
  consequently changes the return value of) the RPC function
  FUZZY-COMPLETIONS. (incompatible api change.)  

  Rationale: The number of supported classification can be changed
  without having to adapt its display at the client.

* slime-fuzzy.lisp (slime-fuzzy-insert-completion-choice):
  (slime-fuzzy-fill-completions-buffer): Adapted to API change.


--- /project/slime/cvsroot/slime/contrib/swank-fuzzy.lisp	2008/01/10 00:39:37	1.7
+++ /project/slime/cvsroot/slime/contrib/swank-fuzzy.lisp	2008/03/14 14:31:52	1.8
@@ -30,14 +30,14 @@
 The main result is a list of completion objects, where a completion
 object is:
 
-    (COMPLETED-STRING SCORE (&rest CHUNKS) FLAGS)
+    (COMPLETED-STRING SCORE (&rest CHUNKS) CLASSIFICATION-STRING)
 
 where a CHUNK is a description of a matched substring:
 
     (OFFSET SUBSTRING)
 
-and FLAGS is a list of keywords describing properties of the 
-symbol (see CLASSIFY-SYMBOL).
+and FLAGS is short string describing properties of the symbol (see
+CLASSIFY-SYMBOL and STRING-CLASSIFICATION->STRING).
 
 E.g., completing \"mvb\" in a package that uses COMMON-LISP would
 return something like:
@@ -131,11 +131,11 @@
       (values result (search symbol-name result)))))
 
 (defun fuzzy-convert-matching-for-emacs (fuzzy-matching user-input-string)
-  "Converts a result from the fuzzy completion core into
-something that emacs is expecting.  Converts symbols to strings,
-fixes case issues, and adds information describing if the symbol
-is :bound, :fbound, a :class, a :macro, a :generic-function,
-a :special-operator, or a :package."
+  "Converts a result from the fuzzy completion core into something
+that emacs is expecting.  Converts symbols to strings, fixes case
+issues, and adds information (as a string) describing if the symbol is
+bound, fbound, a class, a macro, a generic-function, a
+special-operator, or a package."
   (with-struct (fuzzy-matching. symbol score package-chunks symbol-chunks) fuzzy-matching
     (multiple-value-bind (name added-length)
 	(fuzzy-format-matching fuzzy-matching user-input-string)
@@ -148,7 +148,7 @@
 				(let ((offset (first chunk)) (string (second chunk)))
 				  (list (+ added-length offset) string))) 
 			    symbol-chunks))
-	    (classify-symbol symbol)))))
+	    (symbol-classification->string (classify-symbol symbol))))))
 
 (defun fuzzy-completion-set (string default-package-name &key limit time-limit-in-msec)
   "Returns two values: an array of completion objects, sorted by




More information about the slime-cvs mailing list