mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
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.
This commit is contained in:
parent
da5e0050ac
commit
9b4b4a8355
3 changed files with 34 additions and 19 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue