rgrep is an interactive autoloaded compiled Lisp function in `grep.el'.

(rgrep REGEXP &optional FILES DIR CONFIRM)

Recursively grep for REGEXP in FILES in directory tree rooted at DIR.
The search is limited to file names matching shell pattern FILES.
FILES may use abbreviations defined in `grep-files-aliases', e.g.
entering `ch' is equivalent to `*.[ch]'.

With C-u prefix, you can edit the constructed shell command line
before it is executed.
With two C-u prefixes, directly edit and run `grep-find-command'.

Collect output in a buffer. While the recursive grep is running,
you can use C-x ` (M-x next-error), or RET in the grep output buffer,
to visit the lines where matches were found. To kill the job
before it finishes, type C-c C-k.

This command shares argument histories with M-x lgrep and M-x grep-find.

When called programmatically and FILES is nil, REGEXP is expected
to specify a command to run.