emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/flx 64ccdd3a0d 116/182: Revert "Stabilise search results w


From: ELPA Syncer
Subject: [nongnu] elpa/flx 64ccdd3a0d 116/182: Revert "Stabilise search results when scores are equal."
Date: Tue, 13 Dec 2022 03:59:35 -0500 (EST)

branch: elpa/flx
commit 64ccdd3a0d96e12c34a9bea7483dfaaef79699b4
Author: Brian Suh <brian.j.suh@gmail.com>
Commit: Brian Suh <brian.j.suh@gmail.com>

    Revert "Stabilise search results when scores are equal."
    
    This reverts commit 813e56a014eb9a929ad8a58142ee61a35f674276.
---
 flx-ido.el            |  9 +--------
 misc/flx-helm-demo.el | 10 ++--------
 2 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/flx-ido.el b/flx-ido.el
index 1b9648fdbd..7cb18b0efb 100644
--- a/flx-ido.el
+++ b/flx-ido.el
@@ -178,14 +178,7 @@ If filtered item count is still greater than 
`flx-ido-threshold', then use flex.
                                  finally return matches)))
           (flx-ido-decorate (delete-consecutive-dups
                              (sort matches
-                                   (lambda (x y)
-                                     (let ((scorex (cadr x))
-                                           (scorey (cadr y))
-                                           (strx (car x))
-                                           (stry (car y)))
-                                       (if (= scorex scorey)
-                                           (not (string< stry strx))
-                                         (> scorex scorey)))))
+                                   (lambda (x y) (> (cadr x) (cadr y))))
                              t)))
       flex-result)))
 
diff --git a/misc/flx-helm-demo.el b/misc/flx-helm-demo.el
index 417941270a..34fb4d17fe 100644
--- a/misc/flx-helm-demo.el
+++ b/misc/flx-helm-demo.el
@@ -26,14 +26,8 @@ The score info we add here is later removed with another 
filter."
                                 (setcdr candidate (cons (cdr candidate) score))
                                 candidate)))
       (setq res (sort res
-                      (lambda (x y)
-                        (let ((scorex (caddr x))
-                              (scorey (caddr y))
-                              (strx (car x))
-                              (stry (car y)))
-                          (if (= scorex scorey)
-                              (not (string< stry strx))
-                            (> scorex scorey))))))
+                      (lambda (a b)
+                        (> (caddr a) (caddr b)))))
       (loop for item in res
             for index from 0
             for score = (cddr item)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]