branch: elpa/flx commit 9fec96087b787154aeced2c4efce5555ee7feba6 Author: Le Wang <le.w...@agworld.com.au> Commit: Le Wang <le.w...@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)