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

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

[elpa] externals/embark c5ac899d87 4/4: Extend fix for #641 to all async


From: ELPA Syncer
Subject: [elpa] externals/embark c5ac899d87 4/4: Extend fix for #641 to all async consult search commands
Date: Tue, 13 Jun 2023 03:57:45 -0400 (EDT)

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

    Extend fix for #641 to all async consult search commands
---
 embark-consult.el | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/embark-consult.el b/embark-consult.el
index 8d8f58bf39..549cd8427d 100644
--- a/embark-consult.el
+++ b/embark-consult.el
@@ -214,19 +214,6 @@ This function is meant to be added to 
`embark-collect-mode-hook'."
 (setf (alist-get 'consult-grep embark-exporters-alist)
       #'embark-consult-export-grep)
 
-(cl-defun embark-consult--projectless
-    (&rest rest &key run target type &allow-other-keys)
-  "Run action with nil `consult-project-function', if TARGET has an directory.
-The values of TYPE which are considered to have an associated
-directory are: file, buffer, bookmark and library.  The REST of
-the arguments are also passed to RUN."
-  (when (embark--associated-directory target type)
-    (let (consult-project-function)
-      (apply run :target target :type type rest))))
-
-(cl-pushnew #'embark-consult--projectless
-            (alist-get 'consult-grep embark-around-action-hooks))
-
 ;;; Support for consult-xref
 
 (declare-function xref--show-xref-buffer "ext:xref")
@@ -394,9 +381,21 @@ for any action that is a Consult async command."
       (goto-char (point-max))
       (insert separator))))
 
+(cl-defun embark-consult--projectless
+    (&rest rest &key run target type &allow-other-keys)
+  "Run action with nil `consult-project-function', if TARGET has an directory.
+The values of TYPE which are considered to have an associated
+directory are: file, buffer, bookmark and library.  The REST of
+the arguments are also passed to RUN."
+  (when (embark--associated-directory target type)
+    (let (consult-project-function)
+      (apply run :target target :type type rest))))
+
 (map-keymap
  (lambda (_key cmd)
    (cl-pushnew #'embark--cd (alist-get cmd embark-around-action-hooks))
+   (cl-pushnew #'embark-consult--projectless
+               (alist-get cmd embark-around-action-hooks))
    (cl-pushnew #'embark-consult--prep-async
                (alist-get cmd embark-target-injection-hooks)))
  embark-consult-async-search-map)



reply via email to

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