From 5f5555da87fdd767b4ece9ac4b63ebd25985487d Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Mon, 10 Jun 2019 03:10:34 +0300 Subject: [PATCH] Unbreak saving xref--original-window, etc * lisp/progmodes/xref.el (xref--show-xref-buffer) (xref--show-defs-buffer-at-bottom): Move major mode calls earlier. So that local variable values are not lost. --- lisp/progmodes/xref.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 24e2bd04e76..e88f30ca358 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -798,8 +798,8 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (funcall fetcher))) (xref-alist (xref--analyze xrefs))) (with-current-buffer (get-buffer-create xref-buffer-name) - (xref--show-common-initialize xref-alist fetcher alist) (xref--xref-buffer-mode) + (xref--show-common-initialize xref-alist fetcher alist) (pop-to-buffer (current-buffer)) (current-buffer)))) @@ -854,8 +854,8 @@ local keymap that binds `RET' to `xref-quit-and-goto-xref'." (assoc-default 'display-action alist))) (t (with-current-buffer (get-buffer-create xref-buffer-name) - (xref--show-common-initialize (xref--analyze xrefs) fetcher alist) (xref--transient-buffer-mode) + (xref--show-common-initialize (xref--analyze xrefs) fetcher alist) (pop-to-buffer (current-buffer) '(display-buffer-in-direction . ((direction . below)))) (current-buffer)))))) -- 2.39.2