]> code.delx.au - gnu-emacs/commitdiff
Override 'grep --color=always'
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 3 Jun 2015 23:46:16 +0000 (02:46 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 3 Jun 2015 23:46:43 +0000 (02:46 +0300)
* lisp/progmodes/xref.el (xref-collect-matches):
Override --color=always in grep-find-template.

lisp/progmodes/xref.el

index f786d4e3ac703d7c8fad180620d7e19b705157f2..89a9cf5d5ea099a9fc7f867378d316363d3c0785 100644 (file)
@@ -749,8 +749,13 @@ tools are used, and when."
   (require 'semantic/fw)
   (grep-compute-defaults)
   (defvar grep-find-template)
-  (let* ((grep-find-template (replace-regexp-in-string "-e " "-E "
-                                                       grep-find-template t t))
+  (let* ((grep-find-template
+          (replace-regexp-in-string
+           ;; Override the use ot '--color=always' on MS-Windows.
+           "--color=always" ""
+           (replace-regexp-in-string "-e " "-E "
+                                     grep-find-template t t)
+           t t))
          (command (rgrep-default-command (xref--regexp-to-extended regexp)
                                          "*.*" dir))
          (orig-buffers (buffer-list))