[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elisp programming - navigate through code?
From: |
Thorsten Jolitz |
Subject: |
Re: elisp programming - navigate through code? |
Date: |
Sat, 29 Mar 2014 18:17:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Martin <kleinerdrache@gmx.at> writes:
> Hi there,
>
> This is now specially for elisp, but maybe its possible for other things to
> (ruby on rails - ruby, javascript, coffeescript, ...)
>
> Is there a way to navigate better through my code.
>
> like having a function (foo arg1 arg2) putting the cursor to foo will
> C-h f suggest I want to read the docstring for that. Thats good.
>
> But now I'd like to navigate to the definition (which can be in the same
> buffer or somewhere else). Is that possbile?
you can use tags
,--------------------------------------------------------------------
| http://www.gnu.org/software/emacs/manual/html_node/eintr/etags.html
`--------------------------------------------------------------------
or a function like this:
,---------------------------------------------------
| ;; jumps to the source of the symbol at point
| (defun tj/goto-symbol-definition ()
| "jump to the source of the symbol at point."
| (interactive)
| (require 'finder)
| (let ((thing (intern (thing-at-point 'symbol))))
| (if (functionp thing)
| (find-function thing)
| (find-variable thing))))
`---------------------------------------------------
--
cheers,
Thorsten