From: Juri Linkov Date: Sat, 6 Jun 2015 22:02:38 +0000 (+0300) Subject: * lisp/progmodes/grep.el (zrgrep): Let-bind grep-highlight-matches X-Git-Tag: emacs-25.0.90~1838 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6fec047e9470731d588e52f516c1c704a7a55411;p=emacs.git * lisp/progmodes/grep.el (zrgrep): Let-bind grep-highlight-matches before calling grep-compute-defaults because now it affects the command lines computed in grep-compute-defaults. (Bug#20728) --- diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 68852f7b558..cc6662f3bf3 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -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