diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-06 16:32:35 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-08 02:03:55 -0500 |
commit | 4fdcbd09af29e72456c9ca4cfbc9f6e97a88f8b8 (patch) | |
tree | f9c04d33f9669584fe4de42c4980a6c75f0baad3 /etc | |
parent | 9830421e964cfb39077b69efd38d122e3bacf5d4 (diff) | |
download | emacs-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/NEWS | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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. |