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

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

[nongnu] elpa/flx 9fec96087b 010/182: fix sort modifying list by side-ef


From: ELPA Syncer
Subject: [nongnu] elpa/flx 9fec96087b 010/182: fix sort modifying list by side-effect bug
Date: Tue, 13 Dec 2022 03:59:14 -0500 (EST)

branch: elpa/flx
commit 9fec96087b787154aeced2c4efce5555ee7feba6
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>

    fix sort modifying list by side-effect bug
---
 flx-scratch-helm.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/flx-scratch-helm.el b/flx-scratch-helm.el
index bd0c89b66f..29f74251a5 100644
--- a/flx-scratch-helm.el
+++ b/flx-scratch-helm.el
@@ -39,9 +39,9 @@ The score info we add here is later removed with another 
filter."
                                   (setq candidate (cons (copy-sequence 
candidate) candidate)))
                                 (setcdr candidate (cons (cdr candidate) score))
                                 candidate)))
-      (sort res
-            (lambda (a b)
-              (> (caddr a) (caddr b))))
+      (setq res (sort res
+                      (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]