Function: semantic-symref-grep-use-template
semantic-symref-grep-use-template is a byte-compiled function defined
in grep.el.gz.
Signature
(semantic-symref-grep-use-template ROOTDIR FILEPATTERN FLAGS PATTERN)
Documentation
Use the grep template expand feature to create a grep command.
ROOTDIR is the root location to run the find from.
FILEPATTERN is a string representing find flags for searching file patterns.
FLAGS are flags passed to Grep, such as -n or -l.
PATTERN is the pattern used by Grep.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/symref/grep.el.gz
(defun semantic-symref-grep-use-template (rootdir filepattern flags pattern)
"Use the grep template expand feature to create a grep command.
ROOTDIR is the root location to run the `find' from.
FILEPATTERN is a string representing find flags for searching file patterns.
FLAGS are flags passed to Grep, such as -n or -l.
PATTERN is the pattern used by Grep."
;; We have grep-compute-defaults. Let's use it.
(grep-compute-defaults)
(let* ((semantic-symref-grep-flags flags)
(grep-expand-keywords semantic-symref-grep-expand-keywords)
(cmd (grep-expand-template
(if (memq system-type '(windows-nt ms-dos))
;; FIXME: Is this still needed?
;; grep-find uses '--color=always' on MS-Windows
;; because it wants the colorized output, to show
;; it to the user. By contrast, here we don't show
;; the output, and the SGR escapes get in the way
;; of parsing the output.
(replace-regexp-in-string "--color=always" ""
grep-find-template t t)
grep-find-template)
pattern
filepattern
rootdir)))
cmd))