]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/grep.el (zrgrep): Let-bind grep-highlight-matches
authorJuri Linkov <juri@linkov.net>
Sat, 6 Jun 2015 22:02:38 +0000 (01:02 +0300)
committerJuri Linkov <juri@linkov.net>
Sat, 6 Jun 2015 22:02:38 +0000 (01:02 +0300)
before calling grep-compute-defaults because now it affects the
command lines computed in grep-compute-defaults. (Bug#20728)

lisp/progmodes/grep.el

index 68852f7b55821d877deb828df862d58a94adbc70..cc6662f3bf3803c40a726e3180e5fc8389d7bcaa 100644 (file)
@@ -1077,6 +1077,9 @@ file name to `*.gz', and sets `grep-highlight-matches' to `always'."
           (grep-find-template nil)
           (grep-find-command nil)
           (grep-host-defaults-alist nil)
+          ;; Set `grep-highlight-matches' to `always'
+          ;; since `zgrep' puts filters in the grep output.
+          (grep-highlight-matches 'always)
           ;; Use for `grep-read-files'
           (grep-files-aliases '(("all" . "* .*")
                                 ("gz"  . "*.gz"))))
@@ -1094,10 +1097,7 @@ file name to `*.gz', and sets `grep-highlight-matches' to `always'."
                                            nil default-directory t))
                  (confirm (equal current-prefix-arg '(4))))
             (list regexp files dir confirm grep-find-template)))))))
-  ;; Set `grep-highlight-matches' to `always'
-  ;; since `zgrep' puts filters in the grep output.
-  (let ((grep-find-template template)
-        (grep-highlight-matches 'always))
+  (let ((grep-find-template template))
     (rgrep regexp files dir confirm)))
 
 ;;;###autoload