branch: elpa/slime
commit bcff233da294bc28df4401f0e91d92ae78a4dab4
Author: Stas Boukarev <stass...@gmail.com>
Commit: Stas Boukarev <stass...@gmail.com>

    slime-fuzzy: don't show the matching score.
    
    Unclear what to do with that information.
---
 contrib/slime-fuzzy.el   | 32 ++++++++++++++++----------------
 contrib/swank-fuzzy.lisp |  3 +--
 2 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/contrib/slime-fuzzy.el b/contrib/slime-fuzzy.el
index 06029c0b6e5..1f3d35fb901 100644
--- a/contrib/slime-fuzzy.el
+++ b/contrib/slime-fuzzy.el
@@ -274,7 +274,7 @@ most recently enclosed macro or function."
                                (slime-fuzzy-completions prefix)
                                (if slime-fuzzy-default-completion-ui
                                    (list beg end 
-                                         (cl-loop for (symbol-name score 
chunks classification-string) in completion-set
+                                         (cl-loop for (symbol-name chunks 
classification-string) in completion-set
                                                   collect (propertize 
symbol-name
                                                                       
'slime-fuzzy-kind
                                                                       
classification-string)) 
@@ -282,14 +282,18 @@ most recently enclosed macro or function."
                                                          (let ((prop 
(get-text-property 0 'slime-fuzzy-kind x)))
                                                            (when prop
                                                              (cl-loop for 
(char kind) in '((?g method)
-                                                                               
            (?m macro)
                                                                                
            (?f function)
                                                                                
            (?b variable)
                                                                                
            (?c class)
                                                                                
            (?t class)
                                                                                
            (?p module))
                                                                       when 
(cl-find char prop)
-                                                                      return 
kind)))))
+                                                                      return 
kind))))
+                                         :annotation-function
+                                         (lambda (x)
+                                           (let ((kind (get-text-property 0 
'slime-fuzzy-kind x)))
+                                             (when kind
+                                               (concat " " kind)))))
                                    (if (null completion-set)
                                        (progn 
(slime-minibuffer-respecting-message
                                                "Can't find completion for 
\"%s\"" prefix)
@@ -324,7 +328,7 @@ Flags: boundp fboundp generic-function class macro 
special-operator package
   "Inserts the completion object `completion' as a formatted
 completion choice into the current buffer, and mark it with the
 proper text properties."
-  (cl-destructuring-bind (symbol-name score chunks classification-string)
+  (cl-destructuring-bind (symbol-name chunks classification-string)
       completion
     (let ((start (point))
           (end))
@@ -338,9 +342,8 @@ proper text properties."
       (put-text-property start (point) 'mouse-face 'highlight)
       (dotimes (i (- max-length (- end start)))
         (insert " "))
-      (insert (format " %s %s\n"
-                      classification-string
-                      score))
+      (insert (format "  %s\n"
+                      classification-string))
       (put-text-property start (point) 'completion completion))))
 
 (defun slime-fuzzy-insert (text)
@@ -409,21 +412,18 @@ done."
       (dolist (completion completions)
         (setf max-length (max max-length (length (cl-first completion)))))
 
-      (insert "Completion:")
+      (insert "Completion")
       (dotimes (i (- max-length 10)) (insert " "))
-      ;;     Flags:   Score:
-      ;; ... -------  --------
+      ;;     Flags
+      ;; ... -------
       ;;     bfgctmsp
       (let* ((example-classification-string (cl-fourth (cl-first completions)))
-             (classification-length (length example-classification-string))
-             (spaces (- classification-length (length "Flags:"))))
-        (insert "Flags:")
-        (dotimes (i spaces) (insert " "))
-        (insert " Score:\n")
+             (classification-length (length example-classification-string)))
+        (insert "  Flags\n")
         (dotimes (i max-length) (insert "-"))
         (insert " ")
         (dotimes (i classification-length) (insert "-"))
-        (insert " --------\n")
+        (insert " ---------\n")
         (setq slime-fuzzy-first (point)))
 
       (dolist (completion completions)
diff --git a/contrib/swank-fuzzy.lisp b/contrib/swank-fuzzy.lisp
index bc10920794a..0352aabada9 100644
--- a/contrib/swank-fuzzy.lisp
+++ b/contrib/swank-fuzzy.lisp
@@ -148,13 +148,12 @@ 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
+  (with-struct (fuzzy-matching. symbol package-chunks symbol-chunks
                                 symbol-p)
                fuzzy-matching
     (multiple-value-bind (name added-length)
         (fuzzy-format-matching fuzzy-matching user-input-string)
       (list name
-            (format nil "~,2f" score)
             (append package-chunks
                     (mapcar (lambda (chunk)
                               ;; Fix up chunk positions to account for possible

Reply via email to