From: Dmitry Gutov Date: Sun, 28 Jun 2015 01:29:03 +0000 (+0300) Subject: Put "--color" before the other options in grep-command X-Git-Tag: emacs-25.0.90~1624 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a1dde6b50fb8601b2a3ac333cc43569622a18500;p=emacs.git 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). --- 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)))