summaryrefslogtreecommitdiff
path: root/lisp/progmodes/xref.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2015-06-26 20:21:50 +0300
committerDmitry Gutov <dgutov@yandex.ru>2015-06-27 23:57:28 +0300
commit9b4b4a8355506a0253d8a4943e0a9aa87f9e92eb (patch)
tree068efb98ea3c08db953b1989c26786254564cd50 /lisp/progmodes/xref.el
parentda5e0050ac161bd9d665c4b406a95bee4f3b4085 (diff)
downloademacs-9b4b4a8355506a0253d8a4943e0a9aa87f9e92eb.tar.gz
Add --color Grep option to the command dynamically
* lisp/progmodes/grep.el (grep-template, grep-find-template): Update the description for <C>. (Bug#20728) (grep-compute-defaults): Don't add the --color option to grep-options. Only add it to grep-command. (grep-expand-keywords): Expand the env value opts into <C>. (grep-expand-template): Replace cf in the env with the opts list, that can include -i and --color. * lisp/progmodes/xref.el (xref-collect-matches): Do not remove "--color=always" from the template, because we don't have to.
Diffstat (limited to 'lisp/progmodes/xref.el')
-rw-r--r--lisp/progmodes/xref.el9
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 469f65d4fa6..50d52d01efe 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -749,13 +749,8 @@ tools are used, and when."
(require 'semantic/fw)
(grep-compute-defaults)
(defvar grep-find-template)
- (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))
+ (let* ((grep-find-template (replace-regexp-in-string "-e " "-E "
+ grep-find-template t t))
(command (rgrep-default-command (xref--regexp-to-extended regexp)
"*.*" dir))
(orig-buffers (buffer-list))