Find elisp function definition

使用find-func,可以快速定位emacs lisp函数定义,配置如下:

(require 'find-func)
(find-function-setup-keys)

快捷键如下:

(defun find-function-setup-keys ()
  "Define some key bindings for the find-function family of functions."
  (define-key ctl-x-map "F" 'find-function)
  (define-key ctl-x-4-map "F" 'find-function-other-window)
  (define-key ctl-x-5-map "F" 'find-function-other-frame)
  (define-key ctl-x-map "K" 'find-function-on-key)
  (define-key ctl-x-map "V" 'find-variable)
  (define-key ctl-x-4-map "V" 'find-variable-other-window)
  (define-key ctl-x-5-map "V" 'find-variable-other-frame))

以前都是傻傻地使用C-h f,然后把光标移到*Help* buffer里面的相应链接上,最后按回车。有了find-func,无需移动光标了。摘一段注释

The funniest thing about this is that I can’t imagine why a package so obviously useful as this hasn’t been written before!!

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据