[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generalizing find-definition
From: |
Stephen Leake |
Subject: |
Re: Generalizing find-definition |
Date: |
Thu, 11 Dec 2014 19:29:26 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (windows-nt) |
Stefan Monnier <address@hidden> writes:
> - identifier-at-point should document more clearly that the return value
> may be something else than a string. AFAIK the only interesting
> non-string non-nil case is to return a special value (e.g. a marker
> or just `t' to stand to (point)) which stands for "let the
> find-definitions code figure out the identifier at that place".
In ada-mode, identifier is a class derived from xref-file-location:
(defclass xref-ada-identifier (xref-file-location)
((id :type string :initarg :identifier)))
This is because identifiers in Ada are overloaded, and are often just
the last part of the fully qualified namespace name. The backend uses
the cross-reference information output by the compiler; the compiler
does the name resolution.
If identifier is restricted to just the string, ada-mode needs a
guarantee that xref-find-definitions will be called with current-buffer
the same as the buffer containing the string, and point in the same
place, so the backend can determine the file, line, column. That seems
kludgy.
--
-- Stephe
- Re: Generalizing find-definition, (continued)
- Re: Generalizing find-definition, Helmut Eller, 2014/12/19
- Re: Generalizing find-definition, Dmitry Gutov, 2014/12/19
- Re: Generalizing find-definition, Dmitry Gutov, 2014/12/25
- Re: Generalizing find-definition, Stefan Monnier, 2014/12/25
- Re: Generalizing find-definition, Stephen Leake, 2014/12/27
- Re: Generalizing find-definition, Stephen Leake, 2014/12/27
- Re: Generalizing find-definition,
Stephen Leake <=
- Re: Generalizing find-definition, Stefan Monnier, 2014/12/11
- Re: Generalizing find-definition, Stephen Leake, 2014/12/12
- Re: Generalizing find-definition, Stefan Monnier, 2014/12/12
- Re: Generalizing find-definition, Dmitry Gutov, 2014/12/13
- Re: Generalizing find-definition, Dmitry Gutov, 2014/12/12
- Re: Generalizing find-definition, Stephen Leake, 2014/12/10
- Re: Generalizing find-definition, Dmitry Gutov, 2014/12/10
- Re: Generalizing find-definition, Stephen Leake, 2014/12/10
- Re: Generalizing find-definition, Stefan Monnier, 2014/12/10
- Re: Generalizing find-definition, Stephen Leake, 2014/12/11