From 062e4f08d63232c31cccde5055124b8e473cf455 Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Wed, 10 Jul 2024 11:33:37 +0200 Subject: 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 6fd0cb2..5da53f7 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." -- cgit v1.0