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

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

[elpa] externals/vertico 357c2503a7: vertico--move-to-front: Add comment


From: ELPA Syncer
Subject: [elpa] externals/vertico 357c2503a7: vertico--move-to-front: Add comment
Date: Wed, 3 Jan 2024 09:59:20 -0500 (EST)

branch: externals/vertico
commit 357c2503a7787193d50dafd8212f2b1cc165ae16
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    vertico--move-to-front: Add comment
---
 vertico.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/vertico.el b/vertico.el
index 492a503e2c..f8f1669684 100644
--- a/vertico.el
+++ b/vertico.el
@@ -255,17 +255,17 @@ The function is configured by BY, BSIZE, BINDEX, BPRED 
and PRED."
     (if-let ((ann (or (vertico--metadata-get 'annotation-function)
                       (plist-get completion-extra-properties 
:annotation-function))))
         (cl-loop for cand in cands collect
-                 (let ((suffix (or (funcall ann cand) "")))
+                 (let ((suff (or (funcall ann cand) "")))
                    ;; The default completion UI adds the 
`completions-annotations'
                    ;; face if no other faces are present.
-                   (unless (text-property-not-all 0 (length suffix) 'face nil 
suffix)
-                     (setq suffix (propertize suffix 'face 
'completions-annotations)))
-                   (list cand "" suffix)))
+                   (unless (text-property-not-all 0 (length suff) 'face nil 
suff)
+                     (setq suff (propertize suff 'face 
'completions-annotations)))
+                   (list cand "" suff)))
       (cl-loop for cand in cands collect (list cand "" "")))))
 
 (defun vertico--move-to-front (elem list)
   "Move ELEM to front of LIST."
-  (if-let ((found (member elem list)))
+  (if-let ((found (member elem list))) ;; No duplicates, compare with Corfu.
       (nconc (list (car found)) (delq (setcar found nil) list))
     list))
 



reply via email to

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