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

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

[elpa] externals/corfu 062e4f08d6 4/5: Call completion-metadata-get with


From: ELPA Syncer
Subject: [elpa] externals/corfu 062e4f08d6 4/5: Call completion-metadata-get without advices
Date: Wed, 10 Jul 2024 06:57:44 -0400 (EDT)

branch: externals/corfu
commit 062e4f08d63232c31cccde5055124b8e473cf455
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Call completion-metadata-get without advices
    
    Marginalia and icon packages use completion-metadata-get to provide their
    annotations for minibuffer completion.
---
 corfu.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/corfu.el b/corfu.el
index 6fd0cb25cb..5da53f767e 100644
--- a/corfu.el
+++ b/corfu.el
@@ -716,10 +716,10 @@ FRAME is the existing frame."
 
 (defun corfu--metadata-get (prop)
   "Return PROP from completion metadata."
-  ;; Marginalia are too heavy for the popup.
-  (cl-letf (((symbol-function 'marginalia--completion-metadata-get) #'ignore)
-            (completion-extra-properties (nth 4 completion-in-region--data)))
-    (compat-call completion-metadata-get corfu--metadata prop)))
+  ;; Marginalia are too heavy for Corfu. Use `completion-metadata-get' without 
advices.
+  (let ((completion-extra-properties (nth 4 completion-in-region--data)))
+    (funcall (advice--cd*r (symbol-function (compat-function 
completion-metadata-get)))
+             corfu--metadata prop)))
 
 (defun corfu--format-candidates (cands)
   "Format annotated CANDS."



reply via email to

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