emacs-devel
[Top][All Lists]
Advanced

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

Re: Adding support for xref jumping to headers/interfaces


From: Dmitry Gutov
Subject: Re: Adding support for xref jumping to headers/interfaces
Date: Sat, 11 Nov 2023 03:08:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 09/11/2023 22:44, João Távora wrote:
On Thu, Nov 9, 2023 at 7:23 PM Spencer Baugh<sbaugh@janestreet.com>  wrote:
João Távora<joaotavora@gmail.com>  writes:
On Wed, Nov 8, 2023 at 11:34 PM Dmitry Gutov<dgutov@yandex.ru>  wrote:
But neither was available at the time, so I did those commands and they won't
be obsoleted any time soon.
Reasons being..?
That we can't come up with alternatives to exactly that interface,
obviously.  When you do, I'll obsolete them.  But do you want to hardcode
things like LSP "typeDefinition" and Sly's "who-macroexpands" somewhere
in xref.el?  How would that work?
Right, so if we have kinds defined in the core for "declaration",
"implementation", and "type-definition" (maybe not with those exact
names), then we can have xref-find-declaration,
xref-find-implementation, and xref-find-type-definition (again maybe not
with those exact names), and just do

(define-obsolete-function-alias 'eglot-find-declaration 'xref-find-declaration)
(define-obsolete-function-alias 'eglot-find-implementation 
'xref-find-implementation)
(define-obsolete-function-alias 'eglot-find-typeDefinition 
'xref-find-type-definition)

Is that possible?
For Dmitry to answer

FWIW, the above is one of the alternatives that I had in mind when I mentioned obsoleting the said commands.

The other alternative looked like this, though:

(make-obsolete 'eglot-find-declaration "use `xref-find-extra'" "...")
(make-obsolete 'eglot-find-implementation "use `xref-find-extra'" "...")
(make-obsolete 'eglot-find-typeDefinition "use `xref-find-extra'" "...")



reply via email to

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