mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Make EIEIO use records.
* lisp/emacs-lisp/eieio-compat.el (eieio--generic-static-object-generalizer): Adjust to new tags. * lisp/emacs-lisp/eieio-core.el: Use records, and place the class object directly as tag. (eieio--object-class): Adjust to new tag representation. (eieio-object-p): Rewrite, and adapt to new `type-of' behavior. (eieio-defclass-internal): Use `make-record'. (eieio--generic-generalizer): Adjust generalizer code accordingly. * lisp/emacs-lisp/eieio.el (make-instance, clone): Use copy-record. * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Add `recordp'. * doc/lispref/records.texi, doc/misc/eieio.texi: Update for records.
This commit is contained in:
parent
0565482838
commit
8e6f204f44
7 changed files with 35 additions and 49 deletions
|
|
@ -145,7 +145,7 @@ Summary:
|
|||
;; interleaved list comes before the class's non-interleaved list.
|
||||
51 #'cl--generic-struct-tag
|
||||
(lambda (tag &rest _)
|
||||
(and (symbolp tag) (boundp tag) (setq tag (symbol-value tag))
|
||||
(and (symbolp tag) (setq tag (cl--find-class tag))
|
||||
(eieio--class-p tag)
|
||||
(let ((superclasses (eieio--class-precedence-list tag))
|
||||
(specializers ()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue