bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50067: Context menus


From: Mattias Engdegård
Subject: bug#50067: Context menus
Date: Fri, 20 Aug 2021 19:06:20 +0200

20 aug. 2021 kl. 09.31 skrev Juri Linkov <juri@linkov.net>:

> If the existing `xref-backend-identifier-at-point` can't be reused
> by adding a new optional arg `click`, then a cleaner solution
> would be to add `xref-backend-identifier-at-mouse` indeed.

`xref-backend-identifier-at-point` is a generic function implemented by each 
backend; a new function appears cleaner. Suggested patch attached!

More discoveries and questions:

* If I start emacs -Q and enable context-menu-mode, right-clicking on an 
identifier in an elisp buffer still doesn't produce the Find Definition entry, 
presumably because xref hasn't been loaded. Shouldn't it be arranged to be 
autoloaded somehow, which is how xref works when invoked by keystrokes?

* `xref-make-match` requires (contrary to its doc string) its LOCATION argument 
to be of type `xref-file-location`, but some backends may only be able to make 
an `xref-buffer-location`. Would anyone object to changing the :location slot 
of `xref-match-item` to have type `xref-location`? I don't see how it could 
hurt.

Attachment: 0001-Add-Find-References-to-context-menu.patch
Description: Binary data


reply via email to

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