* lisp/progmodes/grep.el (grep-compute-defaults): Put "--color"
before the other options in grep-command (bug#20912).
" -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
nil 1)
(if (eq grep-highlight-matches 'always)
"--color=always" "--color"))
- ""))))
+ "")
+ grep-options)))
(unless grep-template
(setq grep-template
(format "%s <X> <C> %s <R> <F>" grep-program grep-options)))