2012-03-09 77 views
1

当emacs执行grep时,它可以拆分窗口并显示一个很好的缓冲区,并且Emacs具有函数(grep args),我想知道,如何获取源代码?emacs如何实现grep?

回答

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. 

您也可以找到有用的find-library拨开周围。