]> git.eshelyaron.com Git - emacs.git/commit
cl-preloaded.el (built-in-class): New type
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 6 Mar 2024 21:32:35 +0000 (16:32 -0500)
committerEshel Yaron <me@eshelyaron.com>
Mon, 11 Mar 2024 09:16:15 +0000 (10:16 +0100)
commit27ae1b7da5310a4bf9231d8016689de4984fae98
tree7e08baeee28f00bc9eff35d612cb61ce8d101a58
parent98722438f7b9dafa81f17d5a7b0fc348b9941821
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.

(cherry picked from commit 4fdcbd09af29e72456c9ca4cfbc9f6e97a88f8b8)
etc/NEWS
lisp/emacs-lisp/cl-extra.el
lisp/emacs-lisp/cl-preloaded.el