From 6fec047e9470731d588e52f516c1c704a7a55411 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 7 Jun 2015 01:02:38 +0300 Subject: [PATCH] * 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) --- lisp/progmodes/grep.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.39.5