emacs如何实现grep?

Eri*_*c.Q 1 emacs grep

当emacs执行grep时,它可以拆分窗口并显示一个漂亮的缓冲区,而Emacs有这个函数(grep args),我想知道,我怎样才能得到源代码?

Dan*_*man 5

Emacs执行外部grep进程,并格式化输出.假设你的意思是包装它并显示它的代码的源代码,而不是grep本身,这很简单:

M-x find-function <RET> grep <RET>

(find-function FUNCTION)

Find the definition of the FUNCTION near point.

Finds the source file containing the definition of the function
near point (selected by `function-called-at-point') in a buffer and
places point before the definition.
Set mark before moving, if the buffer already existed.
Run Code Online (Sandbox Code Playgroud)

您可能还会发现find-library有用的东西.