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

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

[elpa] externals/embark c2721bef37 23/30: Simplify code for ensuring emb


From: ELPA Syncer
Subject: [elpa] externals/embark c2721bef37 23/30: Simplify code for ensuring embark-selected-candidates has priority
Date: Thu, 20 Apr 2023 10:58:22 -0400 (EDT)

branch: externals/embark
commit c2721bef377cdc7049f89347a418ae1293d959f3
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>

    Simplify code for ensuring embark-selected-candidates has priority
---
 embark.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/embark.el b/embark.el
index fd611f4312..f0afdd7584 100644
--- a/embark.el
+++ b/embark.el
@@ -3324,9 +3324,8 @@ Return the category metadatum as the type of the 
candidates."
   (add-hook 'embark-indicators #'embark--vertico-indicator)
   (add-hook 'embark-target-finders #'embark--vertico-selected)
   (add-hook 'embark-candidate-collectors #'embark--vertico-candidates)
-  (setq embark-candidate-collectors
-        (cons #'embark-selected-candidates ; ensure highest priority
-              (delq 'embark-selected-candidates embark-candidate-collectors))))
+  (remove-hook 'embark-candidate-collectors #'embark-selected-candidates)
+  (add-hook 'embark-candidate-collectors #'embark-selected-candidates))
 
 ;; ivy
 
@@ -3364,9 +3363,8 @@ Return the category metadatum as the type of the target."
 (with-eval-after-load 'ivy
   (add-hook 'embark-target-finders #'embark--ivy-selected)
   (add-hook 'embark-candidate-collectors #'embark--ivy-candidates)
-  (setq embark-candidate-collectors
-        (cons 'embark-selected-candidates ; ensure highest priority
-              (delq 'embark-selected-candidates embark-candidate-collectors))))
+  (remove-hook 'embark-candidate-collectors #'embark-selected-candidates)
+  (add-hook 'embark-candidate-collectors #'embark-selected-candidates))
 
 ;;; Custom actions
 



reply via email to

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