diff options
| -rw-r--r-- | lisp/simple.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 0ccf2f1d22e..ffd7fcc067a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -385,7 +385,11 @@ select the source buffer." | |||
| 385 | (interactive "p") | 385 | (interactive "p") |
| 386 | (let ((next-error-highlight next-error-highlight-no-select)) | 386 | (let ((next-error-highlight next-error-highlight-no-select)) |
| 387 | (next-error n)) | 387 | (next-error n)) |
| 388 | (pop-to-buffer next-error-last-buffer)) | 388 | (let ((display-buffer-overriding-action '(display-buffer-reuse-window))) |
| 389 | ;; Override user customization such as display-buffer-same-window | ||
| 390 | ;; and use display-buffer-reuse-window to ensure next-error-last-buffer | ||
| 391 | ;; is displayed somewhere, not necessarily in the same window (bug#32607). | ||
| 392 | (pop-to-buffer next-error-last-buffer))) | ||
| 389 | 393 | ||
| 390 | (defun previous-error-no-select (&optional n) | 394 | (defun previous-error-no-select (&optional n) |
| 391 | "Move point to the previous error in the `next-error' buffer and highlight match. | 395 | "Move point to the previous error in the `next-error' buffer and highlight match. |