emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unifying emacs "go to definition" functionality


From: Lawrence Mitchell
Subject: Re: unifying emacs "go to definition" functionality
Date: Wed, 20 Feb 2013 09:59:02 +0000
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Helmut Eller wrote:

[...]

> Using the etags stack is pretty easy.  A more difficult problem is how
> to deal with names that have multiple definitions or definitions that
> have multiple source locations.  E.g. in Emacs Lisp a variable and a
> function can have the same name or in C a function can have a prototype
> definition in a .h file and the actual definition is a .c file.  This
> problem is especially important with languages that have multiple
> methods with the same name.

> In SLIME, when a name has multiple definitions we display all
> definitions (one per line with some context) in a special buffer and the
> user must then choose which one he wants (the next/previous-line
> commands in that buffer automatically displays the source of the current
> definition in the other buffer).

FWIW this is what I do for multiple generic interfaces in the
fortran code browsing support I wrote
(ELPA:f90-interface-browser).  It also hooks into the etags stack
so that you can pop back, and falls back to etags themselves if
no generic interfaces are found.

Interfacing with the etags stack would have been easier with
callbacks I think, but as with Helmut, I don't like etags'
interface for jumping through multiple definitions and prefer a
method which allows the user to see and pick which definition
they want.

Lawrence

-- 
Lawrence Mitchell <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]