diff options
author | Dmitry Gutov <dmitry@gutov.dev> | 2024-10-03 03:04:46 +0300 |
---|---|---|
committer | Dmitry Gutov <dmitry@gutov.dev> | 2024-10-03 03:05:18 +0300 |
commit | c8ecd7fa0da8a597250989430ac2b2465419f18e (patch) | |
tree | 01cb0598e88acbf532c4393442dd574237b4cc2a /lisp/emacs-lisp | |
parent | 79d66b4b2970b915abfde516d867107afa19348f (diff) | |
download | emacs-c8ecd7fa0da8a597250989430ac2b2465419f18e.tar.gz emacs-c8ecd7fa0da8a597250989430ac2b2465419f18e.tar.bz2 emacs-c8ecd7fa0da8a597250989430ac2b2465419f18e.zip |
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).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 19429ce80df..4108512b3fa 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -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))))) |