]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-start): Make sure to move to point-max
authorMartin Rudalics <rudalics@gmx.at>
Sat, 4 Oct 2008 10:09:46 +0000 (10:09 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Sat, 4 Oct 2008 10:09:46 +0000 (10:09 +0000)
only when we are in the compilation buffer.

lisp/ChangeLog
lisp/progmodes/compile.el

index b13f1b48c4cc05d4ef1c86bd4b22eddc53fe68f1..f110de99cb8a7a83405ed7161fff4e962c57a31a 100644 (file)
@@ -1,3 +1,8 @@
+2008-10-04  Martin Rudalics  <rudalics@gmx.at>
+
+       * progmodes/compile.el (compilation-start): Make sure to move to
+       point-max only when we are in the compilation buffer. (Bug#1073)
+
 2008-10-04  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * faces.el (x-create-frame-with-faces): Only setup the toolbar if
index 65e8f952b64eda3ac29339f3022da7cc5f5e35ba..79049a49cfb8099ad0b3bb6241c53109e4583e6e 100644 (file)
@@ -1279,11 +1279,15 @@ Returns the compilation buffer created."
          (setq compilation-in-progress
                (cons proc compilation-in-progress))))
       ;; Now finally cd to where the shell started make/grep/...
-      (setq default-directory thisdir))
-    (if (buffer-local-value 'compilation-scroll-output outbuf)
-       (save-selected-window
-         (select-window outwin)
-         (goto-char (point-max))))
+      (setq default-directory thisdir)
+      ;; The following form selected outwin ever since revision 1.183,
+      ;; so possibly messing up point in some other window (bug#1073).
+      ;; Moved into the scope of with-current-buffer, though still with
+      ;; complete disregard for the case when compilation-scroll-output
+      ;; equals 'first-error (martin 2008-10-04).
+      (when compilation-scroll-output
+       (goto-char (point-max))))
+
     ;; Make it so the next C-x ` will use this buffer.
     (setq next-error-last-buffer outbuf)))