summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-07-10 11:33:37 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2024-07-10 11:33:37 +0200
commit062e4f08d63232c31cccde5055124b8e473cf455 (patch)
treea46744abaa629ed04c645b62eb73d0560c612861
parent2cd4bba3c746a91670a1d356531e27b77a21d058 (diff)
Call completion-metadata-get without advices
Marginalia and icon packages use completion-metadata-get to provide their annotations for minibuffer completion.
-rw-r--r--corfu.el8
1 files 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."