[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult 8fab8a0061: Expose the current consult-xref--fe
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult 8fab8a0061: Expose the current consult-xref--fetcher (See #557) |
Date: |
Sat, 23 Apr 2022 00:57:24 -0400 (EDT) |
branch: externals/consult
commit 8fab8a0061e030bf1d0d583f5b4da687df564d14
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Expose the current consult-xref--fetcher (See #557)
---
consult-xref.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/consult-xref.el b/consult-xref.el
index 263d6d6ad5..2a32c0648b 100644
--- a/consult-xref.el
+++ b/consult-xref.el
@@ -29,9 +29,10 @@
(require 'xref)
(defvar consult-xref--history nil)
+(defvar consult-xref--fetcher nil)
-(defun consult-xref--candidates (xrefs)
- "Return candidate list from XREFS."
+(defun consult-xref--candidates ()
+ "Return xref candidate list."
(let ((root (consult--project-root)))
(mapcar (lambda (xref)
(let* ((loc (xref-item-location xref))
@@ -47,7 +48,7 @@
(add-text-properties
0 1 `(consult-xref ,xref consult-xref--group ,group) cand)
cand))
- xrefs)))
+ (funcall consult-xref--fetcher))))
(defun consult-xref--preview (display)
"Xref preview with DISPLAY function."
@@ -87,9 +88,9 @@
This function can be used for `xref-show-xrefs-function'.
See `xref-show-xrefs-function' for the description of the
FETCHER and ALIST arguments."
- (let ((candidates (consult--with-increased-gc
- (consult-xref--candidates (funcall fetcher))))
- (display (alist-get 'display-action alist)))
+ (let* ((consult-xref--fetcher fetcher)
+ (candidates (consult--with-increased-gc (consult-xref--candidates)))
+ (display (alist-get 'display-action alist)))
(xref-pop-to-location
(if (cdr candidates)
(apply
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/consult 8fab8a0061: Expose the current consult-xref--fetcher (See #557),
ELPA Syncer <=