From: Dmitry Gutov Date: Wed, 28 Feb 2018 01:38:37 +0000 (+0200) Subject: Fix xref--next-error-function behavior WRT current buffer X-Git-Tag: emacs-27.0.90~5601 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=11c58c4fc495ea4f7bff52ca077fd3e4382aa900;p=emacs.git Fix xref--next-error-function behavior WRT current buffer * lisp/progmodes/xref.el (xref--show-location): Make sure to make the target window selected at the end, and its buffer current (bug#20489). --- diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index e0f5b2d3670..1c1fc597c50 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -501,8 +501,9 @@ SELECT is `quit', also quit the *xref* window." (xref-buffer (current-buffer))) (cond (select (if (eq select 'quit) (quit-window nil nil)) - (with-current-buffer xref-buffer - (select-window (xref--show-pos-in-buf marker buf)))) + (select-window + (with-current-buffer xref-buffer + (xref--show-pos-in-buf marker buf)))) (t (save-selected-window (xref--with-dedicated-window