Commit 072b4c67 authored by Juri Linkov's avatar Juri Linkov

* lisp/simple.el (next-error-no-select): Use save-selected-window.

Let-bind display alist of display-buffer-overriding-action to
`(inhibit-same-window . t)'.  (Bug#32607)
parent 039be4e0
Pipeline #359 failed with stage
in 4 seconds
......@@ -383,13 +383,11 @@ backwards, if negative).
Finds and highlights the source line like \\[next-error], but does not
select the source buffer."
(interactive "p")
(let ((next-error-highlight next-error-highlight-no-select))
(next-error n))
(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)))
(let ((next-error-highlight next-error-highlight-no-select)
'(nil (inhibit-same-window . t))))
(next-error n))))
(defun previous-error-no-select (&optional n)
"Move point to the previous error in the `next-error' buffer and highlight match.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment