[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1772d88c1f: Call xref--analyze with correct project
From: |
Stephen Leake |
Subject: |
master 1772d88c1f: Call xref--analyze with correct project |
Date: |
Wed, 16 Nov 2022 12:52:37 -0500 (EST) |
branch: master
commit 1772d88c1fa811eee235ba9b8b7584bb000ac293
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Commit: Stephen Leake <stephen_leake@stephe-leake.org>
Call xref--analyze with correct project
* lisp/progmodes/xref.el (xref-show-definitions-buffer-at-bottom):
Call xref--analyze with correct project.
---
lisp/progmodes/xref.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index bb36688ef8..89a090ae93 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1237,16 +1237,21 @@ local keymap that binds `RET' to
`xref-quit-and-goto-xref'."
(max-height (/ (window-height) 2))
(size-fun (lambda (window)
(fit-window-to-buffer window max-height)))
+ xref-alist
buf)
(cond
((not (cdr xrefs))
(xref-pop-to-location (car xrefs)
(assoc-default 'display-action alist)))
(t
+ ;; Call it here because it can call (project-current), and that
+ ;; might depend on individual buffer, not just directory.
+ (setq xref-alist (xref--analyze xrefs))
+
(with-current-buffer (get-buffer-create xref-buffer-name)
(xref--ensure-default-directory dd (current-buffer))
(xref--transient-buffer-mode)
- (xref--show-common-initialize (xref--analyze xrefs) fetcher alist)
+ (xref--show-common-initialize xref-alist fetcher alist)
(pop-to-buffer (current-buffer)
`(display-buffer-in-direction . ((direction . below)
(window-height .
,size-fun))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 1772d88c1f: Call xref--analyze with correct project,
Stephen Leake <=