On 15.11.2022 23:48, Dmitry Gutov wrote:
On 15.11.2022 23:37, Stephen Leake wrote:+Â Â Â Â Â ;; xref--analyze uses (project-current), so it must be done in +Â Â Â Â Â ;; the original buffer. +Â Â Â Â Â (setq xrefs (xref--analyze xrefs))LGTM, thanks!Maybe change the comment from "uses" to "can use" (or "might"), because that only happens with the currently default value of xref-file-name-display. Or not. That's a very minor detail.
Actually, how about this one?The difference is slight, but we don't reuse a variable for a value with different structure, and it mirrors the same variable in related/similar functions in this package.
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 0213ab3cc5..3e04291bc3 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1230,16 +1230,20 @@ xref-show-definitions-buffer-at-bottom (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))))
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4