[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: |
Fri, 05 Dec 2014 03:43:19 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (windows-nt) |
Helmut Eller <address@hidden> writes:
> On Thu, Dec 04 2014, Stephen Leake wrote:
>
>>> Hmm, xref-find-definition does this, except for the case when it's not
>>> called interactively.
>>
>> I bound xref-find-definition to a key. When I invoke that key, I'm
>> prompted for the identifier; the default is the identifier at point, but
>> I still have to hit enter.
>
> Something's odd here. xref-find-definition does NOT prompt by
> default.
Ah. It only prompts if xref-identifier-at-point returns nil; I must have
tested find-definition before I finished implementing
identifier-at-point.
Sorry for the noise.
Other comments:
xref.el needs (provide 'xref).
For elisp, when I have a variable and function with the same name, the
*xref* buffer shows:
c:/Projects/org.emacs.ada-mode/wisi.el
wisi-number-p
(defvar wisi-number-p)
That would be more consistent if the first reference was shown as:
(defun wisi-number-p)
In ada-mode, I use compilation-mode for showing multiple references;
that is a familiar UI. I gather the mode you implemented is similar to
SLIME? Perhaps we need another dispatch/user option to choose this UI?
For Ada, only "find uses of identifier" returns multiple locations. That
function is not in xref.el yet. I suggest:
(defun xref-find-references (&optional identifier)
(interactive (list (xref--read-identifier "Find references of: ")))
(xref--find-references identifier nil))
similar to find-definitions.
Hmm, the dispatching name has to be different; perhaps
xref-find-references-m (for 'method')?
I'd actually prefer xref-find-definitions as the user function, and
xref-find-defintions-m as the dispatching function; the user function
can show more than one definition.
--
-- Stephe
- Re: Generalizing find-definition, Helmut Eller, 2014/12/01
- Re: Generalizing find-definition, Stephen Leake, 2014/12/03
- Re: Generalizing find-definition, Stephen Leake, 2014/12/04
- Re: Generalizing find-definition, Helmut Eller, 2014/12/04
- Re: Generalizing find-definition, Stephen Leake, 2014/12/04
- Re: Generalizing find-definition, Helmut Eller, 2014/12/04
- Re: Generalizing find-definition,
Stephen Leake <=
- Re: Generalizing find-definition, Helmut Eller, 2014/12/05
- Re: Generalizing find-definition, Stephen Leake, 2014/12/05
- Re: Generalizing find-definition, Helmut Eller, 2014/12/06
- Re: Generalizing find-definition, Stephen Leake, 2014/12/06
- RE: Generalizing find-definition, Drew Adams, 2014/12/06
- Re: Generalizing find-definition, Stephen Leake, 2014/12/07
- Re: Generalizing find-definition, Stefan Monnier, 2014/12/06
- Re: Generalizing find-definition, Helmut Eller, 2014/12/07
- Re: Generalizing find-definition, Stefan Monnier, 2014/12/08
- Re: Generalizing find-definition, Helmut Eller, 2014/12/08