From bccc6e3d9f4afdcf01eee130d6f42d096c270dad Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 16 Feb 1999 03:36:28 +0000 Subject: [PATCH] (compile-internal): Use save-selected-window. --- lisp/progmodes/compile.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 216efddb0a9..2e51b100684 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -816,10 +816,9 @@ exited abnormally with code %d\n" (compilation-handle-exit 'bizarre status status)))) (message "Executing `%s'...done" command))) (if compilation-scroll-output - (let ((currbuf (current-buffer))) + (save-selected-window (select-window outwin) - (goto-char (point-max)) - (select-window (get-buffer-window currbuf))))) + (goto-char (point-max))))) ;; Make it so the next C-x ` will use this buffer. (setq compilation-last-buffer outbuf))) -- 2.39.2