From: Juri Linkov Date: Wed, 12 Sep 2018 21:47:03 +0000 (+0300) Subject: * lisp/simple.el (next-error-no-select): Set display-buffer-overriding-action X-Git-Tag: emacs-27.0.90~4428 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=78ff92597ef6e9493a4f06cd9bb5eb4fd1faff5f;p=emacs.git * lisp/simple.el (next-error-no-select): Set display-buffer-overriding-action to display-buffer-reuse-window (bug#32607). --- 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." (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))) + ;; Override user customization such as display-buffer-same-window + ;; and use display-buffer-reuse-window to ensure next-error-last-buffer + ;; is displayed somewhere, not necessarily in the same window (bug#32607). + (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.