Jambunathan K <kjambunat...@gmail.com> writes: > For all practical purposes, I find this be sufficient. > > (global-set-key (kbd "C-c f") > (lambda () > (interactive) > (require 'finder) > (let ((thing (intern (thing-at-point 'symbol)))) > (if (functionp thing) > (find-function thing) > (find-variable thing))))) > > Put your cursor on a variable or a function, C-c f and you are staring > right at the definition of the variable or function. For this to work, > the library defining the function or variable should already be > loaded.
Just discovered this from find-func.el (require 'find-func) (find-function-setup-keys) will install the below keymap for you. It would have been more practical if these functions, made a decision of whether some symbol is a function or a variable automatically. There is also this C-x K. ,---- | (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)) `---- --