]> git.eshelyaron.com Git - emacs.git/commit
Make "parentless" structs inherit from their builtin type
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 7 Mar 2024 21:58:15 +0000 (16:58 -0500)
committerEshel Yaron <me@eshelyaron.com>
Mon, 11 Mar 2024 09:16:50 +0000 (10:16 +0100)
commitf20c20036f7c2e1d84c5f03e9e23f41372e416c5
tree49b2d1453ea6f3332f3421484f0af5de398c3b99
parent6466ffe00659114e03c5fc7b0055663ccf3642f3
Make "parentless" structs inherit from their builtin type

* lisp/emacs-lisp/cl-preloaded.el (cl--struct-register-child):
Register child only in struct parents.
(cl-struct-define): Put the "type" as parent of parentless :type structs.
Copy slots only from struct parent classes.
(cl-structure-object): Set (manually) its parent to `record`
and remove assertion that it has no parents.

(cherry picked from commit 7c127fc965fbe781141a6bccbe0b620dc7862b1d)
lisp/emacs-lisp/cl-preloaded.el