emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/progmodes grep.el


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs/lisp/progmodes grep.el
Date: Sat, 28 Feb 2009 17:24:29 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    09/02/28 17:24:29

Modified files:
        lisp/progmodes : grep.el 

Log message:
        (grep-process-setup) [windows-nt msdos]: Use "--color=always".

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/grep.el?cvsroot=emacs&r1=1.99&r2=1.100

Patches:
Index: grep.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/grep.el,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -b -r1.99 -r1.100
--- grep.el     25 Jan 2009 00:54:53 -0000      1.99
+++ grep.el     28 Feb 2009 17:24:29 -0000      1.100
@@ -407,7 +407,11 @@
     ;; `--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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]