diff options
| -rw-r--r-- | lisp/simple.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 905477a1420..ab4960dc968 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -383,13 +383,11 @@ backwards, if negative). | |||
| 383 | Finds and highlights the source line like \\[next-error], but does not | 383 | Finds and highlights the source line like \\[next-error], but does not |
| 384 | select the source buffer." | 384 | select the source buffer." |
| 385 | (interactive "p") | 385 | (interactive "p") |
| 386 | (let ((next-error-highlight next-error-highlight-no-select)) | 386 | (save-selected-window |
| 387 | (next-error n)) | 387 | (let ((next-error-highlight next-error-highlight-no-select) |
| 388 | (let ((display-buffer-overriding-action '(display-buffer-reuse-window))) | 388 | (display-buffer-overriding-action |
| 389 | ;; Override user customization such as display-buffer-same-window | 389 | '(nil (inhibit-same-window . t)))) |
| 390 | ;; and use display-buffer-reuse-window to ensure next-error-last-buffer | 390 | (next-error n)))) |
| 391 | ;; is displayed somewhere, not necessarily in the same window (bug#32607). | ||
| 392 | (pop-to-buffer next-error-last-buffer))) | ||
| 393 | 391 | ||
| 394 | (defun previous-error-no-select (&optional n) | 392 | (defun previous-error-no-select (&optional n) |
| 395 | "Move point to the previous error in the `next-error' buffer and highlight match. | 393 | "Move point to the previous error in the `next-error' buffer and highlight match. |