Subject: Re: bug#69462: 29.2.50; describe-function should support finding references
From: Dmitry Gutov <[email-masked]>
To: Spencer Baugh <[email-masked]>, [email-masked]
Date: Thu, 3 Oct 2024 03:07:03 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Pushed to master in revision c8ecd7fa0da. Closing, but feedback welcome.

On 28/09/2024 02:01, Dmitry Gutov wrote:
> Hi!
> 
> On 28/02/2024 19:31, Spencer Baugh wrote:
>>
>> In emacs-lisp-mode in an Emacs git checkout, M-? (xref-find-references)
>> nicely searches the load path for references to a symbol.
>>
>> It would be neat if this feature could be accessed from
>> describe-function and describe-variable as well, perhaps by just hitting
>> M-? in the help buffer.
>>
>> The feature may need to be redesigned somewhat, since it's currently
>> dependent on being run from a project; to use it from a
>> describe-function help buffer, we'd want to only search the load-path.
> 
> Reusing the Elisp backend seems the easiest approach.
> 
> Caveats:
> 
> * You need to press RET after M-? like anywhere else (unless xref- 
> prompt-for-identifier is customized).
> * A bit hackish change in 'xref-backend-definitions'.
> 
> Pros:
> 
> * Both M-? and M-. work on anything that looks like symbol in the help 
> buffer, quoted or not - though there will be false positives like usual.
> * Can be similarly added to cl-describe-type.