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.