]> git.eshelyaron.com Git - emacs.git/commitdiff
compile/grep fix for bug#10594
authorGlenn Morris <rgm@gnu.org>
Wed, 25 Jan 2012 02:01:22 +0000 (21:01 -0500)
committerGlenn Morris <rgm@gnu.org>
Wed, 25 Jan 2012 02:01:22 +0000 (21:01 -0500)
* lisp/progmodes/compile.el (compilation-next-error-function):
Respect compilation-first-column in the "*compilation*" buffer.
* lisp/progmodes/grep.el (grep-first-column): New variable.

lisp/ChangeLog
lisp/progmodes/compile.el
lisp/progmodes/grep.el

index a07d90969fa9b066bd4ad9a6fb4239354a035988..eff83cb8460ab8367cc5ab699add74b56c765b1c 100644 (file)
@@ -1,5 +1,9 @@
 2012-01-25  Glenn Morris  <rgm@gnu.org>
 
+       * progmodes/compile.el (compilation-next-error-function):
+       Respect compilation-first-column in the "*compilation*" buffer.
+       * progmodes/grep.el (grep-first-column): New variable.  (Bug#10594)
+
        * vc/vc.el (vc-modify-change-comment): Scoping fix.  (Bug#10513)
 
 2012-01-24  Glenn Morris  <rgm@gnu.org>
index f152209956fcdc46d7f7723bf068b3f96e2a1c4a..3b8c3a006996b9a19b29e3294ac71f946608877c 100644 (file)
@@ -2271,6 +2271,7 @@ This is the value of `next-error-function' in Compilation buffers."
   (when reset
     (setq compilation-current-error nil))
   (let* ((screen-columns compilation-error-screen-columns)
+        (first-column compilation-first-column)
         (last 1)
         (msg (compilation-next-error (or n 1) nil
                                      (or compilation-current-error
@@ -2309,7 +2310,10 @@ This is the value of `next-error-function' in Compilation buffers."
                ;; Obey the compilation-error-screen-columns of the target
                ;; buffer if its major mode set it buffer-locally.
                (if (local-variable-p 'compilation-error-screen-columns)
-                   compilation-error-screen-columns screen-columns)))
+                   compilation-error-screen-columns screen-columns))
+              (compilation-first-column
+               (if (local-variable-p 'compilation-first-column)
+                   compilation-first-column first-column)))
           (save-restriction
             (widen)
             (goto-char (point-min))
index 697af76acc9682569f80a664f20cc8e8b113b406..54d678323f60e5ca57ae44086c685ee2d73b352b 100644 (file)
@@ -374,6 +374,9 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
     ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
   "Regexp used to match grep hits.  See `compilation-error-regexp-alist'.")
 
+(defvar grep-first-column 0            ; bug#10594
+  "Value to use for `compilation-first-column' in grep buffers.")
+
 (defvar grep-error "grep hit"
   "Message to print when no matches are found.")