summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2024-03-06 16:32:35 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2024-03-08 02:03:55 -0500
commit4fdcbd09af29e72456c9ca4cfbc9f6e97a88f8b8 (patch)
treef9c04d33f9669584fe4de42c4980a6c75f0baad3 /etc
parent9830421e964cfb39077b69efd38d122e3bacf5d4 (diff)
downloademacs-4fdcbd09af29e72456c9ca4cfbc9f6e97a88f8b8.tar.gz
cl-preloaded.el (built-in-class): New type
Add classes describing the built-in types. * lisp/emacs-lisp/cl-preloaded.el (built-in-class): New type. (cl--define-built-in-type): New aux macro. (all built-in types): "Define" them with it. (cl--builtin-type-p): New aux function. (cl--struct-name-p): Use it. (cl--direct-supertypes-of-type, cl--typeof-types, cl--all-builtin-types): Move the definitions to after the built-in classes are defined, and rewrite to make use of those classes. * lisp/emacs-lisp/cl-extra.el (cl-describe-type): Accept two (unused) optional args, for use with `describe-symbol-backends`. (describe-symbol-backends): Simplify accordingly and add ourselves at the end. (cl--class-children): New function. (cl--describe-class): Use it. Also don't show a silly empty list of slots for the built-in types.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 3a57084688d..2aa669be344 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1612,6 +1612,11 @@ values.
* Lisp Changes in Emacs 30.1
+** Built-in types have now corresponding classes.
+At the Lisp level, this means that things like (cl-find-class 'integer)
+will now return a class object, and at the UI level it means that
+things like 'C-h o integer RET' will show some information about that type.
+
** New var 'major-mode-remap-defaults' and function 'major-mode-remap'.
The first is like Emacs-29's 'major-mode-remap-alist' but to be set by
packages (instead of users). The second looks up those two variables.