From a1dde6b50fb8601b2a3ac333cc43569622a18500 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 28 Jun 2015 04:29:03 +0300 Subject: [PATCH] Put "--color" before the other options in grep-command * lisp/progmodes/grep.el (grep-compute-defaults): Put "--color" before the other options in grep-command (bug#20912). --- lisp/progmodes/grep.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index e20e5bd4c40..639d8d93652 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -579,7 +579,7 @@ This function is called from `compilation-filter-hook'." " -e")))) (unless grep-command (setq grep-command - (format "%s %s %s " grep-program grep-options + (format "%s %s %s " grep-program (or (and grep-highlight-matches (grep-probe grep-program @@ -587,7 +587,8 @@ This function is called from `compilation-filter-hook'." nil 1) (if (eq grep-highlight-matches 'always) "--color=always" "--color")) - "")))) + "") + grep-options))) (unless grep-template (setq grep-template (format "%s %s " grep-program grep-options))) -- 2.11.4.GIT