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

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

[elpa] externals/vertico f9580665ce 2/3: Use completion-metadata-get fro


From: ELPA Syncer
Subject: [elpa] externals/vertico f9580665ce 2/3: Use completion-metadata-get from Compat 30
Date: Mon, 8 Jul 2024 19:00:33 -0400 (EDT)

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

    Use completion-metadata-get from Compat 30
---
 extensions/vertico-multiform.el | 2 +-
 vertico.el                      | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/extensions/vertico-multiform.el b/extensions/vertico-multiform.el
index 58a0eadcc8..830077eb5d 100644
--- a/extensions/vertico-multiform.el
+++ b/extensions/vertico-multiform.el
@@ -106,7 +106,7 @@ The keys in LIST can be symbols or regexps."
 
 (defun vertico-multiform--setup ()
   "Enable modes at minibuffer setup."
-  (let ((cat (completion-metadata-get
+  (let ((cat (compat-call completion-metadata-get
               (completion-metadata (buffer-substring-no-properties
                                     (minibuffer-prompt-end)
                                     (max (minibuffer-prompt-end) (point)))
diff --git a/vertico.el b/vertico.el
index 5109c8a770..c9ba0811d9 100644
--- a/vertico.el
+++ b/vertico.el
@@ -250,11 +250,9 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and 
PRED."
 
 (defun vertico--affixate (cands)
   "Annotate CANDS with annotation function."
-  (if-let ((aff (or (vertico--metadata-get 'affixation-function)
-                    (plist-get completion-extra-properties 
:affixation-function))))
+  (if-let ((aff (vertico--metadata-get 'affixation-function)))
       (funcall aff cands)
-    (if-let ((ann (or (vertico--metadata-get 'annotation-function)
-                      (plist-get completion-extra-properties 
:annotation-function))))
+    (if-let ((ann (vertico--metadata-get 'annotation-function)))
         (cl-loop for cand in cands collect
                  (let ((suff (or (funcall ann cand) "")))
                    ;; The default completion UI adds the 
`completions-annotations'
@@ -302,7 +300,7 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and 
PRED."
 
 (defun vertico--metadata-get (prop)
   "Return PROP from completion metadata."
-  (completion-metadata-get vertico--metadata prop))
+  (compat-call completion-metadata-get vertico--metadata prop))
 
 (defun vertico--sort-function ()
   "Return the sorting function."



reply via email to

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