]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-auto-jump): Call
authorJuri Linkov <juri@jurta.org>
Tue, 12 Feb 2008 23:41:59 +0000 (23:41 +0000)
committerJuri Linkov <juri@jurta.org>
Tue, 12 Feb 2008 23:41:59 +0000 (23:41 +0000)
compile-goto-error only when compilation-auto-jump-to-first-error
is non-nil.
(compilation-scroll-output): Replace :type 'boolean with a choice
that has three options including a third option `first-error'.
Doc fix.
(compilation-start, compilation-forget-errors): Add an alternate
condition comparing compilation-scroll-output with `first-error'
in addition to compilation-auto-jump-to-first-error (to call
compilation-auto-jump in the proper place).

lisp/ChangeLog
lisp/progmodes/compile.el

index b83116ef99cac3a3dbe4049c2ac2a929ef086c65..927b3ce86aa787afc08fa15b78d17c5904751194 100644 (file)
@@ -1,3 +1,22 @@
+2008-02-12  Juri Linkov  <juri@jurta.org>
+
+       * startup.el (fancy-startup-screen, normal-splash-screen):
+       Set default-directory to command-line-default-directory.
+
+       * desktop.el (after-init-hook): Set inhibit-startup-screen to t
+       after reading the desktop.
+
+       * progmodes/compile.el (compilation-auto-jump): Call
+       compile-goto-error only when compilation-auto-jump-to-first-error
+       is non-nil.
+       (compilation-scroll-output): Replace :type 'boolean with a choice
+       that has three options including a third option `first-error'.
+       Doc fix.
+       (compilation-start, compilation-forget-errors): Add an alternate
+       condition comparing compilation-scroll-output with `first-error'
+       in addition to compilation-auto-jump-to-first-error (to call
+       compilation-auto-jump in the proper place).
+
 2008-02-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * international/mule.el (sgml-html-meta-auto-coding-function):
index f75c5a29bc863e08eef7738b906965c510075538..9dca3553b14bea2a7d67f24634ba032d9d299cdc 100644 (file)
@@ -762,7 +762,8 @@ from a different message."
 (defun compilation-auto-jump (buffer pos)
   (with-current-buffer buffer
     (goto-char pos)
-    (compile-goto-error)))
+    (if compilation-auto-jump-to-first-error
+       (compile-goto-error))))
 
 ;; This function is the central driver, called when font-locking to gather
 ;; all information needed to later jump to corresponding source code.
@@ -1054,8 +1055,13 @@ original use.  Otherwise, recompile using `compile-command'."
 
 Setting it causes the Compilation mode commands to put point at the
 end of their output window so that the end of the output is always
-visible rather than the beginning."
-  :type 'boolean
+visible rather than the beginning.
+
+The value `first-error' stops scrolling at the first error, and leaves
+point on its location in the *compilation* buffer."
+  :type '(choice (const :tag "No scrolling" nil)
+                (const :tag "Scroll compilation output" t)
+                (const :tag "Stop scrolling at the first error" first-error))
   :version "20.3"
   :group 'compilation)
 
@@ -1168,7 +1174,8 @@ Returns the compilation buffer created."
        (if highlight-regexp
            (set (make-local-variable 'compilation-highlight-regexp)
                 highlight-regexp))
-        (if compilation-auto-jump-to-first-error
+        (if (or compilation-auto-jump-to-first-error
+               (eq compilation-scroll-output 'first-error))
             (set (make-local-variable 'compilation-auto-jump-to-next) t))
        ;; Output a mode setter, for saving and later reloading this buffer.
        (insert "-*- mode: " name-of-mode
@@ -2160,7 +2167,8 @@ The file-structure looks like this:
   ;; compilations, to set the beginning of "this compilation", it's a good
   ;; place to reset compilation-auto-jump-to-next.
   (set (make-local-variable 'compilation-auto-jump-to-next)
-       compilation-auto-jump-to-first-error))
+       (or compilation-auto-jump-to-first-error
+          (eq compilation-scroll-output 'first-error))))
 
 ;;;###autoload
 (add-to-list 'auto-mode-alist '("\\.gcov\\'" . compilation-mode))