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

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

[elpa] externals/embark a8e56c44e0 05/30: Make sure embark-selected-cand


From: ELPA Syncer
Subject: [elpa] externals/embark a8e56c44e0 05/30: Make sure embark-selected-candidates has highest priority
Date: Thu, 20 Apr 2023 10:58:20 -0400 (EDT)

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

    Make sure embark-selected-candidates has highest priority
    
    This way acting on selected candidates works in the minibuffer too.
---
 embark.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/embark.el b/embark.el
index f01ce39073..ac30ffab6b 100644
--- a/embark.el
+++ b/embark.el
@@ -3309,7 +3309,10 @@ Return the category metadatum as the type of the 
candidates."
 (with-eval-after-load 'vertico
   (add-hook 'embark-indicators #'embark--vertico-indicator)
   (add-hook 'embark-target-finders #'embark--vertico-selected)
-  (add-hook 'embark-candidate-collectors #'embark--vertico-candidates))
+  (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))))
 
 ;; ivy
 
@@ -3346,7 +3349,10 @@ 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))
+  (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))))
 
 ;;; Custom actions
 



reply via email to

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