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

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

[elpa] externals/marginalia f2ac221aba 2/4: Advise (compat-function comp


From: ELPA Syncer
Subject: [elpa] externals/marginalia f2ac221aba 2/4: Advise (compat-function completion-metadata-get) provided by Compat 30
Date: Mon, 8 Jul 2024 18:59:16 -0400 (EDT)

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

    Advise (compat-function completion-metadata-get) provided by Compat 30
---
 marginalia.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/marginalia.el b/marginalia.el
index 92dac7f025..6fb205397f 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -1318,10 +1318,12 @@ Remember `this-command' for 
`marginalia-classify-by-command-name'."
         ;; Remember `this-command' in order to select the annotation function.
         (add-hook 'minibuffer-setup-hook #'marginalia--minibuffer-setup)
         ;; Replace the metadata function.
+        (advice-add (compat-function completion-metadata-get) :before-until 
#'marginalia--completion-metadata-get)
         (advice-add #'completion-metadata-get :before-until 
#'marginalia--completion-metadata-get)
         ;; Record completion base position, for `marginalia--full-candidate'
         (advice-add #'completion-all-completions :filter-return 
#'marginalia--base-position))
     (advice-remove #'completion-all-completions #'marginalia--base-position)
+    (advice-remove (compat-function completion-metadata-get) 
#'marginalia--completion-metadata-get)
     (advice-remove #'completion-metadata-get 
#'marginalia--completion-metadata-get)
     (remove-hook 'minibuffer-setup-hook #'marginalia--minibuffer-setup)))
 



reply via email to

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