branch: externals/corfu
commit 062e4f08d63232c31cccde5055124b8e473cf455
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
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."