|
From: | Dmitry Gutov |
Subject: | Re: master 128ed5c9f17: Add one more mouse-set-point call to functions xref-find-*-at-mouse |
Date: | Thu, 31 Aug 2023 14:03:29 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 31/08/2023 05:51, Po Lu wrote:
Dmitry Gutov<dmitry@gutov.dev> writes:Sorry, I'm still not seeing your point. Especially the last paragraph in my last email seems to remain unaddressed. And both commands take EVENT as an argument already. The problem is not where is searched for an identifier, but *from where* it searched for the identifier's locations. And that position is important only for particular Xref backends (both LSP-based ones, I'm assuming).My point is this: xref-find-definitions itself, not its callers, should take EVENT, then call (goto-char (posn-point (event-start event))) within.
All right, but even that wouldn't save us from having to move to the position twice (one in the interactive form, and once in the function body).
Otherwise, I see your point and cause of frustration, but extending the convention to many (every?) interactive function seems difficult.
OTOH, Juri's line of thought with menu-handling code doing the move sounds feasible. Maybe there would be a new interactive spec for such commands, to choose which ones would need this specifically.
[Prev in Thread] | Current Thread | [Next in Thread] |