]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/simple.el (next-error-no-select): Set display-buffer-overriding-action
authorJuri Linkov <juri@linkov.net>
Wed, 12 Sep 2018 21:47:03 +0000 (00:47 +0300)
committerJuri Linkov <juri@linkov.net>
Wed, 12 Sep 2018 21:47:03 +0000 (00:47 +0300)
to display-buffer-reuse-window (bug#32607).

lisp/simple.el

index 0ccf2f1d22ee2eb94f36b0aca07277d9f8a8410a..ffd7fcc067ad1c83b216b8aea4162f84762a5065 100644 (file)
@@ -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.