From 94530e7ea9450e6b3eff255b80f76f8f7b051632 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 5 Sep 2021 03:52:29 +0300 Subject: [PATCH] Belated fix * lisp/progmodes/xref.el: (xref--show-xref-buffer): Fix support for xref-auto-jump-to-first-xref. --- lisp/progmodes/xref.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index e959f601e94..86cbdf1fb98 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1,7 +1,7 @@ ;;; xref.el --- Cross-referencing commands -*-lexical-binding:t-*- ;; Copyright (C) 2014-2021 Free Software Foundation, Inc. -;; Version: 1.2.0 +;; Version: 1.2.1 ;; Package-Requires: ((emacs "26.1")) ;; This is a GNU ELPA :core package. Avoid functionality that is not @@ -1042,13 +1042,16 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (assoc-default 'fetched-xrefs alist) (funcall fetcher))) (xref-alist (xref--analyze xrefs)) - (dd default-directory)) + (dd default-directory) + buf) (with-current-buffer (get-buffer-create xref-buffer-name) (setq default-directory dd) (xref--xref-buffer-mode) (xref--show-common-initialize xref-alist fetcher alist) (pop-to-buffer (current-buffer)) - (current-buffer)))) + (setq buf (current-buffer))) + (xref--auto-jump-first buf (assoc-default 'auto-jump alist)) + buf)) (defun xref--project-root (project) (if (fboundp 'project-root) -- 2.39.2