]> git.eshelyaron.com Git - emacs.git/commitdiff
(describe-symbol-backends): Fix addition of the "type" backend
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 21 Mar 2024 22:27:03 +0000 (18:27 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sun, 24 Mar 2024 14:18:34 +0000 (15:18 +0100)
That backend was added from `cl-extra.el` with no autoload, so
(describe-symbol `advice) failed to show the info about
the `advice` type unless `cl-extra.el` had been loaded beforehand.
`C-h o RET advice RET` worked by accident because the completion
table uses `cl-some` which is autoloaded from `cl-extra.el`.

* lisp/help-mode.el (describe-symbol-backends): Add the "type" backend.
* lisp/emacs-lisp/cl-extra.el (describe-symbol-backends): Don't add the
"type" backend here.

(cherry picked from commit 2000d6e0f27f9f34f343016f4aa93e09c29c8695)

lisp/emacs-lisp/cl-extra.el
lisp/help-mode.el

index c8eaca9a77c981535e2193bfbfa5344a2a728198..d43c21d3eb9df1db9e1b4cbd5c83ccce69740f9d 100644 (file)
@@ -711,13 +711,6 @@ PROPLIST is a list of the sort returned by `symbol-plist'.
 (eval-when-compile (require 'cl-macs))  ;Explicitly, for cl--find-class.
 (require 'help-mode)
 
-;; FIXME: We could go crazy and add another entry so describe-symbol can be
-;; used with the slot names of CL structs (and/or EIEIO objects).
-(add-to-list 'describe-symbol-backends
-             `(nil ,#'cl-find-class ,#'cl-describe-type)
-             ;; Document the `cons` function before the `cons` type.
-             t)
-
 (defconst cl--typedef-regexp
   (concat "(" (regexp-opt '("defclass" "defstruct" "cl-defstruct"
                             "cl-deftype" "deftype"))
index f9ec8a5cc2b268252a7d5a5f45877417772aa81b..dd78342ace78b5a4c15e2bfd9552c758002176c0 100644 (file)
@@ -545,6 +545,9 @@ it does not already exist."
         (or (and (boundp symbol) (not (keywordp symbol)))
             (get symbol 'variable-documentation)))
      ,#'describe-variable)
+    ;; FIXME: We could go crazy and add another entry so describe-symbol can be
+    ;; used with the slot names of CL structs (and/or EIEIO objects).
+    ("type" ,#'cl-find-class ,#'cl-describe-type)
     ("face" ,#'facep ,(lambda (s _b _f) (describe-face s))))
   "List of providers of information about symbols.
 Each element has the form (NAME TESTFUN DESCFUN) where: