From: Dmitry Gutov Date: Sun, 5 Sep 2021 00:52:29 +0000 (+0300) Subject: Belated fix X-Git-Tag: emacs-28.0.90~1173 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=94530e7ea9450e6b3eff255b80f76f8f7b051632;p=emacs.git Belated fix * lisp/progmodes/xref.el: (xref--show-xref-buffer): Fix support for xref-auto-jump-to-first-xref. --- 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)