summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2018-12-23 01:52:25 +0200
committerJuri Linkov <juri@linkov.net>2018-12-23 01:52:25 +0200
commit072b4c679dfd5528e74849cad18246730a991933 (patch)
treec526318490ae9e9dffb82d0965d90f649f35cb5c
parent039be4e02513e03ae465efae5694bd4e28a74dbe (diff)
downloademacs-072b4c679dfd5528e74849cad18246730a991933.tar.gz
emacs-072b4c679dfd5528e74849cad18246730a991933.tar.bz2
emacs-072b4c679dfd5528e74849cad18246730a991933.zip
* 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)
-rw-r--r--lisp/simple.el12
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 905477a1420..ab4960dc968 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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)))
+ (save-selected-window
+ (let ((next-error-highlight next-error-highlight-no-select)
+ (display-buffer-overriding-action
+ '(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.