diff options
author | Eli Zaretskii <eliz@gnu.org> | 2009-02-28 17:26:00 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2009-02-28 17:26:00 +0000 |
commit | 8f0e19afc870cd6a049f734f51db66bfa7fa55d0 (patch) | |
tree | 5b1e5c09a364683ffbf2a9b2e926af6dce83cde3 /lisp/progmodes/grep.el | |
parent | 0a9564cb018d500e9b981769b2bd24d2c23ef26d (diff) | |
download | emacs-8f0e19afc870cd6a049f734f51db66bfa7fa55d0.tar.gz |
(grep-process-setup) [windows-nt msdos]: Use "--color=always".
Diffstat (limited to 'lisp/progmodes/grep.el')
-rw-r--r-- | lisp/progmodes/grep.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index b4bcc5c88a5..fa73f7f777a 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -407,7 +407,11 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." ;; `--color=auto' emits escape sequences on a tty rather than on a pipe, ;; thus allowing to use multiple grep filters on the command line ;; and to output escape sequences only on the final grep output - (setenv "GREP_OPTIONS" (concat (getenv "GREP_OPTIONS") " --color=auto")) + (setenv "GREP_OPTIONS" + (concat (getenv "GREP_OPTIONS") + ;; Windows and DOS pipes fail `isatty' detection in Grep. + " --color=" (if (memq system-type '(windows-nt ms-dos)) + "always" "auto"))) ;; GREP_COLOR is used in GNU grep 2.5.1, but deprecated in later versions (setenv "GREP_COLOR" "01;31") ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions |