[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 2000d6e0f27: (describe-symbol-backends): Fix addition of the "typ
From: |
Stefan Monnier |
Subject: |
master 2000d6e0f27: (describe-symbol-backends): Fix addition of the "type" backend |
Date: |
Thu, 21 Mar 2024 18:27:10 -0400 (EDT) |
branch: master
commit 2000d6e0f27f9f34f343016f4aa93e09c29c8695
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
(describe-symbol-backends): Fix addition of the "type" backend
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.
---
lisp/emacs-lisp/cl-extra.el | 7 -------
lisp/help-mode.el | 3 +++
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index c8eaca9a77c..d43c21d3eb9 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -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"))
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index f9ec8a5cc2b..dd78342ace7 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -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:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 2000d6e0f27: (describe-symbol-backends): Fix addition of the "type" backend,
Stefan Monnier <=