From 6b10ce867f2130532b82d32865b74ec270515809 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 2 Jan 2021 20:50:22 +0200 Subject: [PATCH] xref--show-pos-in-buf: Don't set other-window-scroll-buffer * lisp/progmodes/xref.el (xref--show-pos-in-buf): Don't set other-window-scroll-buffer (bug#45581). --- lisp/progmodes/xref.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 29e7b6849fd..d2b5acd5551 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -547,8 +547,7 @@ If SELECT is non-nil, select the target window." "Goto and display position POS of buffer BUF in a window. Honor `xref--original-window-intent', run `xref-after-jump-hook' and finally return the window." - (let* ((xref-buf (current-buffer)) - (pop-up-frames + (let* ((pop-up-frames (or (eq xref--original-window-intent 'frame) pop-up-frames)) (action @@ -566,9 +565,6 @@ and finally return the window." (with-selected-window (display-buffer buf action) (xref--goto-char pos) (run-hooks 'xref-after-jump-hook) - (let ((buf (current-buffer))) - (with-current-buffer xref-buf - (setq-local other-window-scroll-buffer buf))) (selected-window)))) (defun xref--display-buffer-in-other-window (buffer alist) -- 2.39.5