]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/compile.el (compilation-start): Let-bind `thisenv' to
authorJuri Linkov <juri@jurta.org>
Wed, 7 Sep 2011 12:17:54 +0000 (15:17 +0300)
committerJuri Linkov <juri@jurta.org>
Wed, 7 Sep 2011 12:17:54 +0000 (15:17 +0300)
`compilation-environment'.  Set buffer-local
`compilation-environment' to `thisenv' later after (funcall mode).
(Bug#8340)

* lisp/vc/vc-git.el (vc-git-grep): Remove --no-color.  (Bug#9408)
(vc-git-grep): Prepend "PAGER=" to `compilation-environment'
instead of replacing its value.  (Bug#8340)

lisp/ChangeLog
lisp/progmodes/compile.el
lisp/vc/vc-git.el

index e3e0c857385ff7c72a43ca014c728081cc94ec2a..2bb7bf0466df2a1c11f45552cae90c0470a14a17 100644 (file)
@@ -1,3 +1,14 @@
+2011-09-07  Juri Linkov  <juri@jurta.org>
+
+       * progmodes/compile.el (compilation-start): Let-bind `thisenv' to
+       `compilation-environment'.  Set buffer-local
+       `compilation-environment' to `thisenv' later after (funcall mode).
+       (Bug#8340)
+
+       * vc/vc-git.el (vc-git-grep): Remove --no-color.  (Bug#9408)
+       (vc-git-grep): Prepend "PAGER=" to `compilation-environment'
+       instead of replacing its value.  (Bug#8340)
+
 2011-09-07  Juri Linkov  <juri@jurta.org>
 
        * progmodes/grep.el (grep-regexp-alist): Calculate column positions
index 5f99cfe0028e8e5dd02cd5465325066e07c5f72d..4871c980fb59231097fab9d36d748fdd343dd955 100644 (file)
@@ -1482,6 +1482,7 @@ Returns the compilation buffer created."
              "compilation"
            (replace-regexp-in-string "-mode\\'" "" (symbol-name mode))))
         (thisdir default-directory)
+        (thisenv compilation-environment)
         outwin outbuf)
     (with-current-buffer
        (setq outbuf
@@ -1528,8 +1529,9 @@ Returns the compilation buffer created."
         ;; Remember the original dir, so we can use it when we recompile.
         ;; default-directory' can't be used reliably for that because it may be
         ;; affected by the special handling of "cd ...;".
-        ;; NB: must be fone after (funcall mode) as that resets local variables
+        ;; NB: must be done after (funcall mode) as that resets local variables
         (set (make-local-variable 'compilation-directory) thisdir)
+       (set (make-local-variable 'compilation-environment) thisenv)
        (if highlight-regexp
            (set (make-local-variable 'compilation-highlight-regexp)
                 highlight-regexp))
index fc42b43c97d7648a1a81e2021cf7fe0f851ac08b..1bb246fea0bece550fb14bada40e9590eb829bcc 100644 (file)
@@ -988,7 +988,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
              (setq command nil))
        (setq dir (file-name-as-directory (expand-file-name dir)))
        (setq command
-             (grep-expand-template "git grep --no-color -n -e <R> -- <F>"
+             (grep-expand-template "git grep -n -e <R> -- <F>"
                                     regexp files))
        (when command
          (if (equal current-prefix-arg '(4))
@@ -998,7 +998,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
            (add-to-history 'grep-history command))))
       (when command
        (let ((default-directory dir)
-             (compilation-environment '("PAGER=")))
+             (compilation-environment (cons "PAGER=" compilation-environment)))
          ;; Setting process-setup-function makes exit-message-function work
          ;; even when async processes aren't supported.
          (compilation-start command 'grep-mode))