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

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

[elpa] externals/consult 7e17925 4/5: Allow consult-xref to be customize


From: ELPA Syncer
Subject: [elpa] externals/consult 7e17925 4/5: Allow consult-xref to be customized via consult-customize (Fix #322)
Date: Tue, 1 Jun 2021 14:57:08 -0400 (EDT)

branch: externals/consult
commit 7e1792577891f7523a4dabae61ae5f3ef3f50f87
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Allow consult-xref to be customized via consult-customize (Fix #322)
---
 consult-xref.el | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/consult-xref.el b/consult-xref.el
index d7177b6..d104bc6 100644
--- a/consult-xref.el
+++ b/consult-xref.el
@@ -87,22 +87,26 @@ FETCHER and ALIST arguments."
         (display (alist-get 'display-action alist)))
     (xref-pop-to-location
      (if (cdr candidates)
-         (consult--read
+         (apply
+          #'consult--read
           candidates
-          :prompt "Go to xref: "
-          :history 'consult-xref--history
-          :require-match t
-          :sort nil
-          :category 'xref-location
-          :group #'consult-xref--group
-          :state
-          ;; do not preview other frame
-          (when-let (fun (pcase-exhaustive display
-                           ('frame nil)
-                           ('window #'switch-to-buffer-other-window)
-                           ('nil #'switch-to-buffer)))
-            (consult-xref--preview fun))
-          :lookup #'consult--lookup-candidate)
+          (append
+           (alist-get #'consult-xref consult--read-config)
+           (list
+            :prompt "Go to xref: "
+            :history 'consult-xref--history
+            :require-match t
+            :sort nil
+            :category 'xref-location
+            :group #'consult-xref--group
+            :state
+            ;; do not preview other frame
+            (when-let (fun (pcase-exhaustive display
+                             ('frame nil)
+                             ('window #'switch-to-buffer-other-window)
+                             ('nil #'switch-to-buffer)))
+              (consult-xref--preview fun))
+            :lookup #'consult--lookup-candidate)))
        (get-text-property 0 'consult--candidate (car candidates)))
      display)))
 



reply via email to

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