1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Use Emacs Lisp xref backend in Lisp Help buffers

* lisp/help-fns.el (help-fns--setup-xref-backend):
New function (bug#69462).
(describe-function, describe-variable): Use it here.

* lisp/emacs-lisp/cl-extra.el (cl-describe-type): And here.

* lisp/progmodes/elisp-mode.el (xref-backend-definitions):
Only infer namespace in emacs-lisp-mode (use 'any' otherwise).
This commit is contained in:
Dmitry Gutov 2024-10-03 03:04:46 +03:00
parent 79d66b4b29
commit c8ecd7fa0d
3 changed files with 14 additions and 1 deletions

View file

@ -733,6 +733,8 @@ PROPLIST is a list of the sort returned by `symbol-plist'.
Call `cl--find-class' to get TYPE's propname `cl--class'"
(cl--find-class type))
(declare-function help-fns--setup-xref-backend "help-fns" ())
;;;###autoload
(defun cl-describe-type (type &optional _buf _frame)
"Display the documentation for type TYPE (a symbol)."
@ -753,6 +755,7 @@ Call `cl--find-class' to get TYPE's propname `cl--class'"
;; cl-deftype).
(user-error "Unknown type %S" type))))
(with-current-buffer standard-output
(help-fns--setup-xref-backend)
;; Return the text we displayed.
(buffer-string)))))