diff options
| author | Dmitry Gutov | 2018-02-28 03:38:37 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2018-02-28 04:04:29 +0200 |
| commit | 11c58c4fc495ea4f7bff52ca077fd3e4382aa900 (patch) | |
| tree | af90353622325ea56b8976087bc8a6dd5e2550ca | |
| parent | 7a8f3311a79d63c221dda6e680747669bb3d555d (diff) | |
| download | emacs-11c58c4fc495ea4f7bff52ca077fd3e4382aa900.tar.gz emacs-11c58c4fc495ea4f7bff52ca077fd3e4382aa900.zip | |
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).
| -rw-r--r-- | lisp/progmodes/xref.el | 5 |
1 files changed, 3 insertions, 2 deletions
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." | |||
| 501 | (xref-buffer (current-buffer))) | 501 | (xref-buffer (current-buffer))) |
| 502 | (cond (select | 502 | (cond (select |
| 503 | (if (eq select 'quit) (quit-window nil nil)) | 503 | (if (eq select 'quit) (quit-window nil nil)) |
| 504 | (with-current-buffer xref-buffer | 504 | (select-window |
| 505 | (select-window (xref--show-pos-in-buf marker buf)))) | 505 | (with-current-buffer xref-buffer |
| 506 | (xref--show-pos-in-buf marker buf)))) | ||
| 506 | (t | 507 | (t |
| 507 | (save-selected-window | 508 | (save-selected-window |
| 508 | (xref--with-dedicated-window | 509 | (xref--with-dedicated-window |