diff --git a/lisp/simple.el b/lisp/simple.el index 0ccf2f1d22..df7d86a835 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -385,7 +385,8 @@ next-error-no-select (interactive "p") (let ((next-error-highlight next-error-highlight-no-select)) (next-error n)) - (pop-to-buffer next-error-last-buffer)) + (let ((display-buffer-overriding-action '(display-buffer-reuse-window))) + (pop-to-buffer next-error-last-buffer))) (defun previous-error-no-select (&optional n) "Move point to the previous error in the `next-error' buffer and highlight match.