(compile-internal): Use save-selected-window.
authorRichard M. Stallman <rms@gnu.org>
Tue, 16 Feb 1999 03:36:28 +0000 (03:36 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 16 Feb 1999 03:36:28 +0000 (03:36 +0000)
lisp/progmodes/compile.el

index 216efdd..2e51b10 100644 (file)
@@ -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)))