[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico 6d700d8: Use stricter definition of the affixat
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/vertico 6d700d8: Use stricter definition of the affixation-function |
Date: |
Tue, 27 Apr 2021 16:54:49 -0400 (EDT) |
branch: externals/vertico
commit 6d700d809cff0ad76e2e13f251a24f5cdea75ec7
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Use stricter definition of the affixation-function
See
https://github.com/emacs-mirror/emacs/commit/d8e037eeaa7eef26349bc0fb3fa00e10a5c4b894
---
vertico.el | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/vertico.el b/vertico.el
index f9d9129..c63a738 100644
--- a/vertico.el
+++ b/vertico.el
@@ -198,7 +198,7 @@
(funcall aff candidates)
(if-let (ann (or (completion-metadata-get metadata 'annotation-function)
(plist-get completion-extra-properties
:annotation-function)))
- (mapcar (lambda (cand) (list cand (or (funcall ann cand) "")))
candidates)
+ (mapcar (lambda (cand) (list cand "" (or (funcall ann cand) "")))
candidates)
candidates)))
(defun vertico--move-to-front (elem list)
@@ -344,12 +344,10 @@
(vertico--annotate metadata)))
(max-width (- (window-width) 4))
(current-line 0) (title) (lines))
- (dolist (ann-cand candidates)
- (let* ((prefix "") (suffix "")
- (cand (pcase ann-cand
- (`(,c ,s) (setq suffix s) c)
- (`(,c ,p ,s) (setq prefix p suffix s) c)
- (c c))))
+ (dolist (cand candidates)
+ (let ((prefix "") (suffix ""))
+ (when (consp cand)
+ (setq prefix (cadr cand) suffix (caddr cand) cand (car cand)))
(when-let (new-title (and group-format (funcall title-fun cand nil)))
(unless (equal title new-title)
(push (format group-format (setq title new-title)) lines))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/vertico 6d700d8: Use stricter definition of the affixation-function,
Protesilaos Stavrou <=